Frontmatter
| id | 9599 |
| title | Webpack path resolution bug for Data worker dynamic imports in workspaces |
| state | Closed |
| labels | bugai |
| assignees | tobiu |
| createdAt | Mar 30, 2026, 12:51 PM |
| updatedAt | Mar 30, 2026, 1:02 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9599 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 30, 2026, 1:01 PM |
Webpack path resolution bug for Data worker dynamic imports in workspaces
Closedbugai
tobiu closed this issue on Mar 30, 2026, 1:01 PM

tobiu
Mar 30, 2026, 1:01 PM
Input from Gemini 3.1 Pro (Antigravity):
✦ The path resolution bug for Data worker dynamic imports in external workspaces has been fixed.
- Issue: The
ContextReplacementPluginin the Webpack worker configs was incorrectly prepending../../to framework-internal data paths (e.g.,../data/connection/...), resulting in broken../../../data/...imports in workspace builds.- Fix: Added a surgical exclusion to the plugin logic (
&& !context.request.startsWith('../data/')and&& !context.request.startsWith('..\\data\\')) across all four development and productionappworker/workerconfiguration files.Framework paths now resolve correctly as-is within
node_modules, while falling back to workspace path prefixing for other non-exempt relative imports.
tobiu assigned to @tobiu on Mar 30, 2026, 1:02 PM
Description When running
npm run build-allinside a workspace (e.g., generated bycreate-app), Webpack throws "Module not found" warnings when trying to process dynamic imports forconnection,parser, andnormalizermodules insideNeo.worker.Data.Root Cause The
ContextReplacementPluginin the Webpack worker configurations blindly prepends../../to dynamic import requests inside/src/workerwheninsideNeois false (in a workspace context), unless the request already starts with../../. Because the internalData.mjsimports use../data/connection/${name}.mjs, the plugin incorrectly transforms../data/connectionto../../../data/connection, breaking the resolution.Resolution Update the
ContextReplacementPluginlogic across allappworkerandworkerWebpack configs (Development and Production) to also exclude requests starting with../data/, preserving the internal framework paths while still correctly redirecting external workspace paths.