-
Notifications
You must be signed in to change notification settings - Fork 12k
SASS/SCSS tilde reference no longer works with variables #9061
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
The package needs to be configured similarly to how Font Awesome is used. See this wiki story for details: https://github.com/angular/angular-cli/wiki/stories-include-font-awesome Alternatively, the stylesheet can be added directly to the styles array of |
I am not sure we should be adding every npm module imports inside And more over the essence of that Wiki is about Urls like images/fonts that are relative to I think the |
That's one of the reasons the The issue is due to relative font URLs. Either set the scss variable from here before import or add it to the |
@clydin You are right about the path variable. Version ~ 1.5.4A tilde in the Checkout branch https://github.com/yogeshgadge/demo-app2/tree/tilde-works-in-version-154 $fa-font-path: "~font-awesome/fonts" !default;
@import "~font-awesome/scss/font-awesome"; Version 1.6.3// This does not work
// $fa-font-path: "~font-awesome/fonts" !default;
// must be relative
$fa-font-path: "../node_modules/font-awesome/fonts" !default; This is not good for library applications that depend on (say font-awesome) because now that tilde does not work in One ugly workaround may be to adjust the location of your scss files so that the distance from node_modules to the source is same as the distance in the npm distribution. My question is why did we take out this functionality/feature? |
I have updated the description in the original issue as per @clydin's insights. |
It actually partially works. The tilde is handled but webpack doesn't process a |
Ensure that, on Windows, the path doesn't contain back slashes to be PostCSS friendly :) Following angular#8791 Closes angular#9077 angular#9061 angular#9080
Ensure that, on Windows, the path doesn't contain back slashes to be PostCSS friendly :) Following angular#8791 Closes angular#9077 angular#9061 angular#9080
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. |
Bug Report or Feature Request (mark with an x)
Versions
Repro steps
Problem is reproduced in https://github.com/yogeshgadge/demo-app2
which involves following simple steps:-
styles.scss
import using tilde.Observed behavior
Desired behavior
There should be no build errors.
Mention any other details that might be useful (optional)
Related to #8791 - It seems this is still broken.
The text was updated successfully, but these errors were encountered: