kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

kolibri-build --hot can't resolve style-loader under pnpm

Open rtibblesbot opened this issue 3 weeks ago • 1 comments

❌ 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 --hot fails in a pnpm project that has no root style-loader devDependency, with Can'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 uses require.resolve.
  • resolveLoader.modules searches node_modules, kolibri-build's directory and kolibri-build/node_modules. pnpm puts kolibri-build's own style-loader beside it in .pnpm/kolibri-build@…/node_modules/, so none of them reaches it.
  • Kolibri Data Portal works around it with a root style-loader devDependency (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

  1. In a pnpm project depending on [email protected] and not on style-loader, run kolibri-build dev --plugins <plugin> --hot.
  2. The build fails with Can't resolve 'style-loader'.

Acceptance Criteria

  • [ ] kolibri-build dev --hot builds a plugin in a pnpm project with no root style-loader.
  • [ ] Non-hot dev and prod builds are unchanged.

AI usage

Claude Code found this while reviewing a Kolibri Data Portal branch and drafted this issue.

rtibblesbot avatar Nov 10 '26 21:11 rtibblesbot

Merged into #15810, which fixes this together with the minifier failure and ships both in kolibri-build 1.1.5.

rtibbles avatar Nov 25 '26 00:11 rtibbles