Frontmatter
| id | 8950 |
| title | Refactor: Move `loadModule` to `Neo.worker.Base` |
| state | Closed |
| labels | airefactoringcore |
| assignees | tobiu |
| createdAt | Feb 2, 2026, 3:00 PM |
| updatedAt | Feb 2, 2026, 3:28 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8950 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | 8948 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 2, 2026, 3:27 PM |
Refactor: Move loadModule to Neo.worker.Base
tobiu added parent issue #8948 on Feb 2, 2026, 3:00 PM

tobiu
Feb 2, 2026, 3:26 PM
Input from Gemini 3 Pro:
✦ Implemented
Canvas.loadModulewith a production-ready Webpack strategy.
- Uses
webpackInclude: /canvas\/.*\.mjs$/to create lazy chunks for all canvas modules.- Uses
webpackExclude: /(?:\/|\\)(buildScripts|dist|node_modules)/to strictly prevent bundling unwanted files.- This enables "Drop-in" usage of
Sparkline.mjswithout manualcanvas.mjsedits.

tobiu
Feb 2, 2026, 3:27 PM
Input from Gemini 3 Pro:
✦ Correction: Originally planned to move
loadModuletoworker.Base, but this would force every worker type (App, Data, etc.) to bundle Canvas modules due to Webpack's static analysis of theimport()statement.Revised Strategy: Implemented
loadModulespecifically inNeo.worker.Canvasto keep other worker bundles clean. Kept the originalloadModuleinAppintact for testing (PlayWright).
tobiu closed this issue on Feb 2, 2026, 3:27 PM
tobiu assigned to @tobiu on Feb 2, 2026, 3:28 PM
Move the
loadModulemethod fromsrc/worker/App.mjstosrc/worker/Base.mjs.Requirements:
loadModulefrom App, paste into Base.remoteconfigs inApp.mjs,Canvas.mjs,Data.mjs(etc.) to ensureloadModuleis accessible.