Skip to content
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

Upgrade css-loader to 2.1.0 #6367

Closed
wants to merge 1 commit into from
Closed

Upgrade css-loader to 2.1.0 #6367

wants to merge 1 commit into from

Conversation

gnuletik
Copy link

@gnuletik gnuletik commented Feb 8, 2019

A simple PR to upgrade css-loader to version 2.1.0.
There is a bug with version 1.0.0 when importing a font with a hash at the end.

For example:
This CSS

@font-face {
	font-family: "My Font";
	src: url("My Font.svg#Font Name") format("svg");
}

generates this:

@font-face {
	font-family: "My Font";
	src: url("/static/media/My Font.f84c8961.svg"#Font Name) format("svg");
}

(which is invalid)

This issue is fixed in css-loader v2.0.0.
See the changelog here: https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md
In this commit: webpack-contrib/css-loader#803

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@ianschmitz
Copy link
Contributor

I'm not clear whether we would need to release this as a breaking change in CRA as well. The breaking changes can be seen here: https://github.com/webpack-contrib/css-loader/releases/tag/v2.0.0, or how this will affect things like absolute scss file imports that work today.

I'm going to tag this as a breaking change but if somebody else with some more knowledge of this loader feels otherwise then let us know!

@mrmckeb
Copy link
Contributor

mrmckeb commented Apr 3, 2019

@gnuletik, from what we've read, this disables CSS module support by default, and it needs to be enabled in the config. Can you please update this PR to enable that feature?
https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#features-1

@ianschmitz
Copy link
Contributor

I forgot i had done this as part of #6614. When i was checking the breaking changes i saw that we had already explicitly set modules: true for the css-loader which means we should be good.

@ianschmitz ianschmitz closed this Apr 5, 2019
@lock lock bot locked and limited conversation to collaborators Apr 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants