Frontmatter
| id | 9584 |
| title | Bug: Data worker broadly bundles non-data framework classes (Main.mjs) causing Webpack build failure |
| state | Closed |
| labels | bugaiperformancebuild |
| assignees | tobiu |
| createdAt | Mar 27, 2026, 3:06 PM |
| updatedAt | Mar 27, 2026, 3:18 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9584 |
| author | tobiu |
| commentsCount | 0 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 27, 2026, 3:18 PM |
The
webpackIncluderegex forData.mjspreviously captured the entirety of thesrc/directory (/(?:apps|docs\\/app|examples|src)\\/.*\\.mjs$/). This massively bloated the Data worker's dynamic chunk map with thousands of UI components, main thread controllers, and build loaders.When Webpack traversed the map and compiled
src/Main.mjs, it crashed upon hitting the main-thread workspace addon resolution (import('../../../src/main/addon/')), throwingModule not found: Error: Can't resolve '../../../src/main/addon'. Additionally, it threw critical dependency warnings onsrc/MicroLoader.mjs.By restricting the framework source match in
Data.mjsto exclusively targetsrc\\/datainstead of all ofsrc/, we pruned thousands of invalid classes from the Data worker's chunk map, removing the compilation crashes and massively optimizing build performance.