-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add ~ (tilde) as shortcut for {}/node_modules
?
#246
Comments
~
(tilde) as shortcut for {}/node_modules
?{}/node_modules
?
Do you know if that is Edit: see #246 |
Thank you for quick feedback and action! I like the idea of trying to coordinate the behaviour, hence the syntax! I am not sure the exact extent of that
Besides the webpack Sass loader previously mentioned, as well as the node Sass tilde importer (not webpack). |
@ghybs I kinda lost track of this. But if you're willing to work on this, I'd be happy to merge a PR. |
Hi @sebakerckhof, Thank you for the heads up! I must admit I forgot about it as well, thinking we were waiting for some input in meteor/meteor#8601. I will see when I have time to send you a PR for this simple feature. |
That was the idea, but since we haven't heard any feedback in the meteor issue, I'd say it's safe to move forward. |
Any news on this? |
Ups? |
Is there any progress going on here? |
Actually I don't use this stuff ahahaha |
Webpack uses the I came across this issue looking for another solution, so I'm not familiar with how Meteor handles packages, but I'm sure you could emulate something similar in package.js. |
Fixed per 4.14.1 |
Webpack Sass loader provides the
~
(tilde) prefix as a way to tell the compiler that it should resolve the path using a configured array of module directories (typically<projectRoot>/node_modules
, but can be anything specific to the project).Some IDE's (e.g. WebStorm) provide path resolution analysis and highlighting based on the assumption that the
~
means<projectRoot>/node_modules
.Some libs provide similar functional extension, e.g. https://github.com/matthewdavidson/node-sass-tilde-importer
We could do the same in this package by checking if
~
is the first character in the path, and replace it with{}/node_modules
, or anything configured inscss-config.json
for example.Note: the
~
syntax (or some kind of special syntax) is needed by contrast with ES6import
because in Sass,"./style"
and"style"
are the same.The text was updated successfully, but these errors were encountered: