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

Webpacker v6 -- Blocker to GA -- extract_css removal #2838

Closed
justin808 opened this issue Dec 27, 2020 · 4 comments
Closed

Webpacker v6 -- Blocker to GA -- extract_css removal #2838

justin808 opened this issue Dec 27, 2020 · 4 comments

Comments

@justin808
Copy link
Contributor

Per my review of #2802 (review)

We need to do something about the removal of extract_css from config/webpacker.yml

AFAIK, if one wants to use HMR with CSS, with the webpack-dev-server, in development mode, then we want CSS to come from the regular JS Bundle, so:

  1. We don't use the view helper for the CSS, since
  2. We must not use the mini-css-extract-plugin

CC: @gauravtiwari

@justin808
Copy link
Contributor Author

@gauravtiwari this may have changed in Webpack v5.

https://webpack.js.org/plugins/mini-css-extract-plugin/#hot-module-reloading-hmr

I'm investigating.

Did you test the React HMR with CSS changes?

@pedrofurtado
Copy link
Member

pedrofurtado commented Dec 27, 2020

@justin808 @gauravtiwari Maybe this issue can be related? --> #2832

@justin808
Copy link
Contributor Author

Because css modules is probably the main way that hot loading of CSS works...

Per webpack-contrib/mini-css-extract-plugin#519 (comment), we need to use the style-loader for HMR.

@justin808
Copy link
Contributor Author

See fix in #3031.

@dhh dhh closed this as completed Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants