I've got a FooComponent that has a .scss file attached to it, this works.
However, when trying to import a variable file from an external lib residing in node_modules, it throws an error.
In my .scss file I do:
@import './node_modules/@my-lib/dist/utils/_exports';
But when I run ngc -w tsconfig-aot.json it throws:
Couldn't resolve resource ./node_modules/@my-lib/dist/utils/_exports from /Users/chrillewoodz/my-project/@my-lib/ng/src/components/foo/foo.component.scss
The strange thing is that if I do ngc -p tsconfig-aot.json (notice the -p instead of -w) then it works.
Why is this happening?
-pworks correctly. I have tried many other paths as well but none of them work. So I don't think the problem is with the path itself :/~instead of./node_modules/like this'~@my-lib/dist/utils/_exports'