ember-cli-sass icon indicating copy to clipboard operation
ember-cli-sass copied to clipboard

includePaths doesn't recognise node_modules in yarn workspace

Open andreyfel opened this issue 6 years ago • 1 comments

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.

andreyfel avatar Jun 24 '19 08:06 andreyfel

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'),
],

BarryThePenguin avatar Sep 02 '19 22:09 BarryThePenguin