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

HMR not work if css changed #3227

Closed
wiseadme opened this issue Apr 25, 2021 · 4 comments
Closed

HMR not work if css changed #3227

wiseadme opened this issue Apr 25, 2021 · 4 comments

Comments

@wiseadme
Copy link

wiseadme commented Apr 25, 2021

If I'll change any css rules HMR don't reload the page, but if I'll change HTML document it works fine.

  • Operating System:
  • Node Version: 12.22.1
  • NPM Version: 7.9.0
  • webpack Version: 5.35.1
  • webpack-dev-server Version: 4.0.0-beta.2
  • Browser: Chrome

https://github.com/wiseadme/hmr-problem

  • [x ] This is a bug

Expected Behavior

it should reload page on scss update

Actual Behavior

hot reload not work on style updates

For Bugs; How can we reproduce the behavior?

  1. clone repository https://github.com/wiseadme/hmr-problem.git
  2. install dependencies
  3. npm run dev
  4. change scss variable $main-color in src/styles/main.scss

For Features; What is the motivation and/or use-case for the feature?

for comfortable work on any project

@alexander-akait
Copy link
Member

Thank you for creating this issue. However, issues need to follow one of our templates so that we can clearly understand your particular circumstances.

Please help us help you by recreating the issue using one of our templates.

Please answer on all questions. There are a different things can break your hot realoding. I will reopen the issue after your fix it, thanks

@wiseadme
Copy link
Author

Thank you for creating this issue. However, issues need to follow one of our templates so that we can clearly understand your particular circumstances.

Please help us help you by recreating the issue using one of our templates.

Please answer on all questions. There are a different things can break your hot realoding. I will reopen the issue after your fix it, thanks

I changed the description of the problem and i hope that you can help me to solve it

@alexander-akait
Copy link
Member

Duplicate webpack-contrib/mini-css-extract-plugin#444, do not use [hash] in development mode, we will improve it in the next major release of mini-css-extract-plugin, because it is breaking change, sorry for this problem, CSS is not simple for bundling and HMR

@wiseadme
Copy link
Author

Duplicate webpack-contrib/mini-css-extract-plugin#444, do not use [hash] in development mode, we will improve it in the next major release of mini-css-extract-plugin, because it is breaking change, sorry for this problem, CSS is not simple for bundling and HMR

Ok. Thank you!

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

2 participants