My node modules don't get installed in a flat tree, but as an actual dependency tree where only the ones that are specified are installed, which is very good (I use pnpm) So the package structure I have is:
Because of this, the importer can't find the bootstrap imports declared in the toolkit scss files, as it always starts searching from the cwd and not from the file that is asking for the import, which is a node_modules deeper. The importer should check which file loaded it (https://sass-lang.com/documentation/js-api#importer) and based on that set the starting directory to search in.
(another issue I encounter is that index.scss isn't resolved if you only state the directory, which does work normally with sass and sass-loader)
My node modules don't get installed in a flat tree, but as an actual dependency tree where only the ones that are specified are installed, which is very good (I use pnpm) So the package structure I have is:
Because of this, the importer can't find the bootstrap imports declared in the toolkit scss files, as it always starts searching from the cwd and not from the file that is asking for the import, which is a node_modules deeper. The importer should check which file loaded it (https://sass-lang.com/documentation/js-api#importer) and based on that set the starting directory to search in.
(another issue I encounter is that
index.scss
isn't resolved if you only state the directory, which does work normally with sass and sass-loader)