Frontmatter
| id | 8762 |
| title | Webpack: Migrate All Worker Builds to Native ESM Output |
| state | Closed |
| labels | aiarchitectureperformancebuild |
| assignees | tobiu |
| createdAt | Jan 17, 2026, 7:01 PM |
| updatedAt | Jan 17, 2026, 7:22 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8762 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 17, 2026, 7:22 PM |
Webpack: Migrate All Worker Builds to Native ESM Output

tobiu
Jan 17, 2026, 7:21 PM
Input from Gemini 3 Pro:
✦ I have migrated all Worker builds (App Worker and generic Workers) to use Native ESM Output in both Development and Production environments.
Changes Applied:
- Enabled
experiments: { outputModule: true }in all relevant Webpack configs.- Set
output.library: { type: 'module' }to generate true ES modules.- Set
output.publicPath: 'auto'to leverage native ESM chunk resolution.Files Modified:
buildScripts/webpack/development/webpack.config.appworker.mjsbuildScripts/webpack/development/webpack.config.worker.mjsbuildScripts/webpack/production/webpack.config.appworker.mjsbuildScripts/webpack/production/webpack.config.worker.mjsVerification:
- User confirmed
npm run build-allcompletes successfully.- User confirmed apps in
distenvironment launch and function correctly.This completes the architectural shift to a unified, ESM-first build system for Neo.mjs.
tobiu assigned to @tobiu on Jan 17, 2026, 7:21 PM
tobiu closed this issue on Jan 17, 2026, 7:22 PM
Description
Following the successful modernization of the Main Thread build (Ticket #8760), we are extending the Native ESM Output strategy to all Worker builds.
This is a significant architectural shift. By enabling
experiments: { outputModule: true }andoutput.library: { type: 'module' }across the board, we are instructing Webpack to generate true ECMAScript Modules for all worker bundles (App, Data, VDom, etc.).Benefits:
publicPath: 'auto', allowing nativeimport()to resolve chunks relative to the worker file, eliminating the need for manual path patching logic.Scope
Apply the following changes to all development and production configurations for App Workers and generic Workers:
buildScripts/webpack/development/webpack.config.appworker.mjsbuildScripts/webpack/development/webpack.config.worker.mjsbuildScripts/webpack/production/webpack.config.appworker.mjsbuildScripts/webpack/production/webpack.config.worker.mjsChanges Required
experiments: { outputModule: true }.output.library: { type: 'module' }.output.publicPath: 'auto'(replacing empty string'').targetremainswebworker.Acceptance Criteria
appworker.js,dataworker.js,vdomworker.js, etc.) are generated as valid ES Modules.