-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
css loaders fail to parse relative paths #730
Comments
You can use https://github.com/smithad15/css-to-string-loader css-loader will take care about url() in css, and css-to-string-loader will return all back to string. |
Sames issue as #759 |
I tried @Settler solution to use |
^^ same, tried @Settler method. Worked |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass
[x ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
Report a bug
requiring css in the styles Component attribute fails to concatenate base url to a relative url within that css file, instead concatenating './' and interrupting build process if the file isn't found.
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
Current project, Commit a4019da :
home.component.ts 24:3, change to:
styles: [ require('./home.style.css') ],
home.style.css, add:
:host {
background: url('assets/img/angular-logo.png');
}
run npm run start:hmr
This behavior is not expected to break when all past versions of this repo supported it, and Angular's docs encourage it in the Webpack section.
Switching back to raw-loader to handle css files solves this issue.
The text was updated successfully, but these errors were encountered: