Frontmatter
| id | 8760 |
| title | Webpack: Exclude DefaultConfig from Bundles |
| state | Closed |
| labels | enhancementaibuild |
| assignees | tobiu |
| createdAt | Jan 17, 2026, 6:01 PM |
| updatedAt | Jan 17, 2026, 6:57 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8760 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 17, 2026, 6:57 PM |
Webpack: Exclude DefaultConfig from Bundles

tobiu
Jan 17, 2026, 6:56 PM
Input from Gemini 3 Pro:
✦ I have completed the task to exclude
DefaultConfig.mjsfrom the main bundle, enabling the Network-First strategy for version handshakes.Key Changes:
Webpack Configuration (Dev & Prod):
- Configured
externalsto exclude./DefaultConfig.mjs.- Enabled
experiments: { outputModule: true }and setoutput.library.typeto'module'. This ensuresmain.jsis a native ES module that importsDefaultConfig.mjscorrectly.- Updated
output.publicPathto'auto'to fix chunk loading in nested apps (native ESM resolution).- Added build hooks to copy (and minify for prod)
DefaultConfig.mjsto the output folder using the new helper scripts.Codebase Modernization:
- Removed the legacy
__webpack_require__.ppath patching fromsrc/main/DeltaUpdates.mjs. This hack is no longer needed with native ESM output and was causing conflicts.Verification:
- User verified that the Portal App loads correctly in
dist/developmentmode.- Confirmed that
main.jscontains a nativeimportstatement forDefaultConfig.mjs.- Confirmed that chunks load correctly regardless of
index.htmllocation.This architectural change robustly solves the version handshake issue and modernizes the build output.
tobiu assigned to @tobiu on Jan 17, 2026, 6:56 PM
tobiu closed this issue on Jan 17, 2026, 6:57 PM
tobiu cross-referenced by #8762 on Jan 17, 2026, 7:01 PM
Description
For production builds (
dist/productionanddist/development), we rely on Webpack bundles. Currently,DefaultConfig.mjsmight be bundled into the main chunk. To support the "Network First" strategy for version handshakes (Ticket #TBD),DefaultConfig.mjsmust be excluded from the bundle so it can be requested independently and bypassed by the Service Worker's caching logic.Tasks
dist/productionanddist/developmentbuilds.src/DefaultConfig.mjsfrom the main bundle.DefaultConfig.mjsis copied/available as a standalone file in the output directory.DefaultConfig.mjsat runtime.Acceptance Criteria
DefaultConfig.mjsis NOT part of the main Webpack bundle indistbuilds.dist/productionmode.