-
Notifications
You must be signed in to change notification settings - Fork 115
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
How do I prevent messing up url() in CSS? #77
Comments
So I've been fighting with this for awhile. Turns out there are a couple things going on:
I'm not really sure what the right approach is to address the above. Personally, I think a Then again, maybe that problem wouldn't exist if And I really don't know how to address the problem with Sure would appreciate some discussion around this. I'd be happy to take on the work to implement but need clear directives before I kick anything off. |
With the latest version of the library (3.0.380) the custom pipeline approach was working for me: pipeline.AddBundle("/assets/fonts/material-icons/iconfont/material-icons.min.css", "text/css; charset=utf-8", "node_modules/material-icons/iconfont/material-icons.css")
.EnforceFileExtensions(".css")
// .AdjustRelativePaths()
.Concatenate()
.FingerprintUrls()
.AddResponseHeader("X-Content-Type-Options", "nosniff")
.MinifyCss(new CssSettings { }).UseContentRoot(); I am wondering if there's a better approach today? |
Pipeline setup:
Original (and the desired output) URL in CSS:
Bundled and Minified CSS:
NOTE: It's not just
src: url()
... also happens withbackground-image: url(../img/bg.png)
as well.I have also tried a custom pipeline omitting AdjustRelativePaths() with the same results:
Any thoughts on what I'm doing wrong?
The text was updated successfully, but these errors were encountered: