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
contentTrust
projected
quarantined0
signals[]
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/archive-v12-1-0-chunk-3 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.