v0.20.4
2026-05-06
- [x] Hotfix: production frontend bundle was shipping with an empty
moduleLoaders = {}, so optional modules (system8,genai,scenes,vtt-assets) never had their clientregister()called. Symptom:system8showed up in/api/systemsand the Campaign modal but not in the character sheet system dropdown (which is the only consumer that depends on the client-sidemoduleRegistry). Root cause:scripts/install-hosted-modules-frontend.shcorrectly copies hosted modules intoapps/web/node_modules/@purple-cat-games/...(since v0.20.3), butapps/web/vite-plugin-modules.ts's package-name resolver only walked up from the repo root looking fornode_modulesdirectories.apps/web/node_modulesis a child of the repo root, so the walk-up never found it andresolveClientEntrysilently returnednullfor every hosted module. v0.20.3 unblocked CI's Rollup peer-dep crash but didn't fix the underlying resolution miss — the bundle just started building successfully with no modules wired up. Fix: replace the walk-up with an explicit, ordered search list (apps/web/node_modulesfirst, then repo-rootnode_modules), exported asgetModuleSearchRootsfor testability. Also:purpleCatModulesPluginnow throws when modules declared inmodules.hosted.jsoncan't be resolved (defaults tofailOnUnresolved: truefor hosted config,falseformodules.local.jsonso dev builds with partial configs still succeed). Two silent-skip-shipped-broken-bundle incidents in two months — the build must fail loudly when this happens. Added 5 new tests inapps/web/vite-plugin-modules.test.tscovering: search-root order pinned, hosted-module resolution underapps/web/node_modules(regression test for this exact bug), missing-package error reporting includes searched paths,apps/webwins over repo root when both have the same package, modules with no client entry don't trigger failure, and present-but-broken client entries are flagged.