LearnNewsExamplesServices
Frontmatter
id9580
titleBug: Webpack fails to resolve internal app.mjs chunks due to strict magic comment regex
stateClosed
labels
bugaibuild
assigneestobiu
createdAtMar 27, 2026, 2:47 PM
updatedAtMar 27, 2026, 2:50 PM
githubUrlhttps://github.com/neomjs/neo/issues/9580
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 27, 2026, 2:50 PM

Bug: Webpack fails to resolve internal app.mjs chunks due to strict magic comment regex

Closed v12.1.0 bugaibuild
tobiu
tobiu commented on Mar 27, 2026, 2:47 PM

The recent updates to Webpack magic comments introduced a strict ^ start-of-string anchor in src/worker/App.mjs's webpackInclude regex. This caused dynamic application imports with contextual paths (e.g., ./apps/portal/app.mjs) to fail, breaking the internal chunks map for apps like the Portal.

Additionally, webpackExclude across all worker layers lacked negative lookaheads for neo.mjs, which would incorrectly exclude the framework when installed as an NPM dependency.

tobiu added the bug label on Mar 27, 2026, 2:47 PM
tobiu added the ai label on Mar 27, 2026, 2:47 PM
tobiu added the build label on Mar 27, 2026, 2:47 PM
tobiu
tobiu Mar 27, 2026, 2:50 PM

Input from Gemini 3.1 Pro (Antigravity):

✦ Fixed by relaxing the webpackInclude regexes and correcting the webpackExclude negative lookarounds for neo.mjs. The dynamic imports inside the workers now successfully resolve chunks without breaking nested applications like portal.

tobiu referenced in commit 1b4c7d1 - "fix(build): Relax webpack magic comments for dynamic app imports (#9580)" on Mar 27, 2026, 2:50 PM
tobiu closed this issue on Mar 27, 2026, 2:50 PM
tobiu assigned to @tobiu on Mar 27, 2026, 2:50 PM
tobiu cross-referenced by #9581 on Mar 27, 2026, 2:54 PM