LearnNewsExamplesServices
Frontmatter
id9584
titleBug: Data worker broadly bundles non-data framework classes (Main.mjs) causing Webpack build failure
stateClosed
labels
bugaiperformancebuild
assigneestobiu
createdAtMar 27, 2026, 3:06 PM
updatedAtMar 27, 2026, 3:18 PM
githubUrlhttps://github.com/neomjs/neo/issues/9584
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 27, 2026, 3:18 PM

Bug: Data worker broadly bundles non-data framework classes (Main.mjs) causing Webpack build failure

Closed v12.1.0 bugaiperformancebuild
tobiu
tobiu commented on Mar 27, 2026, 3:06 PM

The webpackInclude regex for Data.mjs previously captured the entirety of the src/ 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/')), throwing Module not found: Error: Can't resolve '../../../src/main/addon'. Additionally, it threw critical dependency warnings on src/MicroLoader.mjs.

By restricting the framework source match in Data.mjs to exclusively target src\\/data instead of all of src/, we pruned thousands of invalid classes from the Data worker's chunk map, removing the compilation crashes and massively optimizing build performance.

tobiu added the bug label on Mar 27, 2026, 3:06 PM
tobiu added the ai label on Mar 27, 2026, 3:06 PM
tobiu added the performance label on Mar 27, 2026, 3:06 PM
tobiu added the build label on Mar 27, 2026, 3:06 PM
tobiu referenced in commit 647a23a - "fix(build): Remove global contextAdjusted from Webpack configs to allow robust dynamic imports (#9584)" on Mar 27, 2026, 3:16 PM
tobiu assigned to @tobiu on Mar 27, 2026, 3:16 PM
tobiu closed this issue on Mar 27, 2026, 3:18 PM