You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rootDir in base tsconfigs breaks workspace builds with ts-loader 9.5.7 #212
When frontend-base is used as an npm workspace package (e.g. via bind mount in a consuming app), npm run dev fails with multiple TS6059 errors like:
[tsl] ERROR
TS6059: File '/path/to/root/node_modules/@formatjs/intl/lib/index.js' is not under 'rootDir' '/path/to/root/packages/frontend-base'.
This happens because both tsconfig.json and tools/tsconfig.json set "rootDir": ".". In a standalone build this works fine since node_modules is inside the package directory. In a workspace, however, npm hoists dependencies to the root node_modules, which is above the package's rootDir.
This was previously masked by ts-loader, which overrode rootDir to undefined in its transpileModule() calls. ts-loader 9.5.7 removed that override (to fix a TypeScript 6.0 compatibility issue), so the tsconfig's rootDir now flows through and triggers the errors.
Since rootDir only controls output directory structure during emit, it doesn't need to be in the base tsconfigs used by ts-loader and webpack. The build tsconfigs (tsconfig.build.json and tools/tsconfig.build.json) either set their own outDir or inherit the correct structure via composite: true.
The fix is to remove rootDir from tsconfig.json and tools/tsconfig.json.
Activity
openedx-semantic-release-bot commentedon Apr 8, 2026
🎉 This issue has been resolved in version 1.0.0-alpha.21 🎉
The release is available on:
Your semantic-release bot 📦🚀