-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Relative url() paths in styles are resolved incorrectly for non-root directory #20360
Comments
Hi @fetis, The problem here is that the bundle name is actually a path, which is not intended. In this case, we should provide a clear error that the bundle name is invalid. |
Angular Material's doc site used this feature of Now with
So while this fix makes sense and having these be paths isn't intended, the path feature is currently being used in applications and will cause them to break in v12. Update: for reference, our fix: angular/material.angular.io#939. |
Please consider adding an output property, Also it might be just me or I don't know how to use it but |
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
Command (mark with an
x
)Is this a regression?
I'm not sure.
Description
It looks like the assets resolution mechanism (with or without
resourcesOutputPath
) always expects that stylesheets are placed in the root folder. If you use elaborate stylesheets configuration with subfolders it brokes relative URLs in stylesheets.🔬 Minimal Reproduction
I have 2 stylesheets
styles.scss
andstyles2.scss
, configured next way inangular.json
both files have the same rule (just for testing)
after build or serve I have the next output
but relative paths in both cases resolved as for a file located in the root, i.e.
background: url(background.png);
Expected behavior
The relative path in
styles2
should be resolved as../background.png
🌍 Your Environment
The text was updated successfully, but these errors were encountered: