-
Notifications
You must be signed in to change notification settings - Fork 74
add node_modules to sass options includePaths and stop overwritting includePaths #60
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks @dagda1. A few minor suggested changes, if you can't make them, I can do it this weekend :)
@mrmckeb Are these changes better? sorry to be annoying but I am dying to get this rolled into my personal projects. |
Hi @dagda1, I'll try to do a release tonight or tomorrow - sorry for the slow reply. You're not annoying, I'm just slow (busy few days) ;) |
Released as https://github.com/mrmckeb/typescript-plugin-css-modules/releases/tag/v2.1.0. Thanks again! |
I finally got the bottom of making this work with my monorepo with external sass options in
node_modules
.I first mentioned this in #37.
I've added
node_modules
to theincludedPaths
for sass by default.const includePaths = [filePath, 'node_modules'];
I also encountered a bug on my travels with this code:
It if you were passing in
includePaths
in the sass options like this:Then it was overwriting the original
includePaths: [filePath]
, you can see an example hereI'm not sure if you agree with adding
node_modules
by default and I will remove it if needs be.