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

Document CSS being removed or force CSS to be effectful #5188

Closed
Timer opened this issue Oct 1, 2018 · 7 comments · Fixed by #5197
Closed

Document CSS being removed or force CSS to be effectful #5188

Timer opened this issue Oct 1, 2018 · 7 comments · Fixed by #5197

Comments

@Timer
Copy link
Contributor

Timer commented Oct 1, 2018

We need to make a decision on #5140.

I'm leaning towards forcing *.{css,sass,scss} files to be effectful.

@edmorley
Copy link

edmorley commented Oct 1, 2018

A downside to forcing CSS to be effectful, is that it wallpapers over mis-configured packages, and means non-CRA tooling (eg Neutrino) will appear to be broken to end users unless we also adopt the workaround.

@gaearon
Copy link
Contributor

gaearon commented Oct 1, 2018

I guess let's mention it in migration notes prominently, and direct to webpack/webpack#6571 for discussion.

@gaearon
Copy link
Contributor

gaearon commented Oct 1, 2018

On the other hand I don't quite feel comfortable with production breakages because of that. I'd feel safer switching to new webpack behavior after webpack adds a warning or an error for this.

@Timer
Copy link
Contributor Author

Timer commented Oct 1, 2018

Do we know of a scenario where importing CSS is not effectful?

@gaearon
Copy link
Contributor

gaearon commented Oct 1, 2018

CSS modules isn't. But @sokra said CSS itself is always effectful.

@Timer
Copy link
Contributor Author

Timer commented Oct 1, 2018

Right -- he made it sound like we can apply it at the loader level, which means we can apply it to .css but not .module.css.

@gaearon
Copy link
Contributor

gaearon commented Oct 1, 2018

Yep. Let's do it for now and we can decide to break in a future major once they have a warning.

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

Successfully merging a pull request may close this issue.

3 participants