Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

includePaths doesn't recognise node_modules in yarn workspace #209

Open
andreyfel opened this issue Jun 24, 2019 · 1 comment
Open

includePaths doesn't recognise node_modules in yarn workspace #209

andreyfel opened this issue Jun 24, 2019 · 1 comment

Comments

@andreyfel
Copy link

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.

@BarryThePenguin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants