kolibri
kolibri copied to clipboard
kolibri-build --hot can't resolve style-loader under pnpm
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: develop
Observed behavior
kolibri-build dev --hotfails in a pnpm project that has no rootstyle-loaderdevDependency, withCan't resolve 'style-loader'.src/webpack.config.base.js:20(kolibri-build 1.1.4) names the hot-mode CSS loader by the bare string'style-loader'; every other loader there usesrequire.resolve.resolveLoader.modulessearchesnode_modules, kolibri-build's directory andkolibri-build/node_modules. pnpm puts kolibri-build's ownstyle-loaderbeside it in.pnpm/kolibri-build@…/node_modules/, so none of them reaches it.- Kolibri Data Portal works around it with a root
style-loaderdevDependency (learningequality/kolibri-data-portal#1247).
Expected behavior
--hot resolves the style-loader kolibri-build depends on, without the consuming project declaring it.
Steps to reproduce
- In a pnpm project depending on
[email protected]and not onstyle-loader, runkolibri-build dev --plugins <plugin> --hot. - The build fails with
Can't resolve 'style-loader'.
Acceptance Criteria
- [ ]
kolibri-build dev --hotbuilds a plugin in a pnpm project with no rootstyle-loader. - [ ] Non-hot
devandprodbuilds are unchanged.
AI usage
Claude Code found this while reviewing a Kolibri Data Portal branch and drafted this issue.
Merged into #15810, which fixes this together with the minifier failure and ships both in kolibri-build 1.1.5.