-
Notifications
You must be signed in to change notification settings - Fork 12k
~ tilde operator unable to path to scss beneath app/src #10077
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
Comments
chose not to use ~ |
I am curious why the tilde shortcut stopped linking to the sass folder also. I have an older project created with version 1.6.3 of the CLI, and the tilde still works for pointing to both the node_modules folder and my sass folder, from .scss files throughout my project, even after upgrading everything to 6.0. I created a new project with 6.0 and it no longer works. I can't find anything in angular.json or tsconfig.json in the older project that is making it work. @nhhockeyplayer can you please re-open this so that someone on the CLI team can determine if this is a bug or not? Thanks! |
@inorganik I am puzzled as to why did @nhhockeyplayer closed this bug? Its a bug, no matter if he/she chose to use ~ or not. Weird. |
I'm using @angular/cli 7.2.2 and |
I discovered it works if you do 2 things:
So this works: ✅ Doesn't work: ⛔️ Note that scss files in node_modules are allowed to be prefixed and don’t need the extension. ¯_(ツ)_/¯ |
thanks for your reply, @inorganik . Unfortunately, still no joy! ⛔️ Can I ask you which version of cli do you use? I'd like to point out that |
Anyway I created a new issue #14387 because I believe this is still a bug |
I solved it.
in my
|
@tonysamperi simply changing root's value to "src" made it work for me. 🎉 Although, it's a little concerning that
|
@inorganik I tried that but my IDE wouldn't recognize the paths, until I changed the tsconfig! |
Using |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
its documented that
~ is a quick way to reference root in order to operate paths to scss
https://scotch.io/tutorials/using-sass-with-the-angular-cli
"The tilde (~) will tell Sass to look in the src/ folder and is a quick shortcut to importing Sass files."
I am using latest releases and tilde is hardwired to node_modules dir
here is my source inside scss file
here is output
node_modules is clearly at the root of the tilde reference
why cant I path into my scss source code ?
The text was updated successfully, but these errors were encountered: