-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix(webpack): fix loader config for global styles #14323
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@@ -432,6 +475,26 @@ function getCommonLoadersForGlobalCss( | |||
]; | |||
} | |||
|
|||
function getCommonLoadersForGlobalStyle( |
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.
Keep this separate from getCommonLoadersForGlobalCss
, because there are minor differences and we want to avoid bad abstractions like we did previously.
@@ -214,35 +214,78 @@ export function withWeb() { | |||
}, | |||
]; | |||
|
|||
const rules: RuleSetRule[] = [ | |||
const globalStyleRules: RuleSetRule[] = [ |
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.
Expand global stylesheets to process less, stylus as well. It was missed previously.
3333bf0
to
681cd79
Compare
6497be2
to
d1af744
Compare
d1af744
to
7d2a074
Compare
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
This PR fixes an issue with global stylesheets specified via
styles
option in@nrwl/webpack:webpack
executor.Now that
raw-css-loader
is removed (replaced bycss-loader
) there are some options we need to set to make it work.Current Behavior
Using
url(...)
in stylesheets, such asbackground-image: url(/'assets/bg.png')
results in an error sincecss-loader
is resolving the URL.Expected Behavior
Using
url(...)
should work.Related Issue(s)
Fixes #