ember-cli-sass
ember-cli-sass copied to clipboard
includePaths doesn't recognise node_modules in yarn workspace
I've got an app in yarn workspace. When I'm trying to use bootstrap-sass, when I specify
includePaths: [
'node_modules/bootstrap-sass/assets/stylesheets',
],
build fails with error Directory not found: node_modules/bootstrap-sass
If I use ../node_modules/bootstrap-sass/assets/stylesheets instead, it works.
This is happening because in yarn workspace bootstrap-sass is installed on the top level of yarn workspace.
All other ember-cli stuff resolves node_modules in yarn workspace correctly.
You can use something like resolve-pkg to resolve paths relative to a package directory
const resolvePkg = require('resolve-pkg')
...
includePaths: [
resolvePkg('bootstrap-sass/assets/stylesheets'),
],