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

Hot reloading tested in different ways and is not working properly #2985

Closed
1 of 2 tasks
Ridermansb opened this issue Feb 2, 2021 · 12 comments
Closed
1 of 2 tasks

Hot reloading tested in different ways and is not working properly #2985

Ridermansb opened this issue Feb 2, 2021 · 12 comments

Comments

@Ridermansb
Copy link

  • Operating System: macOS Big Sur 11.2

  • Node Version: v14.15.4

  • NPM Version: 6.14.10

  • webpack Version: ^5.19.0

  • webpack-dev-server Version: ^4.0.0-beta.0

  • Browser: Google Chrome Version 88

  • This is a bug

  • This is a modification request

Code

Repository link: https://github.com/Ridermansb/webpack5Hot

Expected Behavior

In all case... should not reload the page and only reload the portion that's changed

Actual Behavior

It's Always reloading the entire page.

For Bugs; How can we reproduce the behavior?

Just clone the repository ridermansb/webpack5Hot

  • npm install
  • npm start

And try update Header component

@alexander-akait
Copy link
Member

react-hot-loader is not compatibility with webpack@5 gaearon/react-hot-loader#1449

@alexander-akait
Copy link
Member

alexander-akait commented Feb 2, 2021

You don't have entry, so webpack-dev-server doesn't know how to attach hot reloading my mistake

@Ridermansb
Copy link
Author

react-hot-loader is not compatibility with webpack@5 gaearon/react-hot-loader#1449

And about react-refresh ?
Same happening with react-refresh plugin

@alexander-akait
Copy link
Member

Something wrong in configuration...

@alexander-akait
Copy link
Member

Change:

"start": "webpack serve --mode development --hot --host localhost --static public"

static bug was fixed, host problem will fixed too in near future, --hot only is no need for you, now hot is working, but still not reload modules (you can see it in console)

Why it is still not work? I don't know, also I found your duplicate the issue pmmmwh/react-refresh-webpack-plugin#303, don't do it in future, be patient

@Ridermansb
Copy link
Author

@alexander-akait the problem is that I don't know if this issue is on webpack-dev-server, react-hot-loader or on react-refresh
That's the reason I duplicated the issue.


About your recommendation, after I made this change... the UI is not updating

comment01

@alexander-akait
Copy link
Member

Problem from react-refresh-webpack-plugin

@Edge00
Copy link

Edge00 commented Mar 2, 2021

webpack-dev-server Version: ^4.0.0-beta.0
whole page refreshed on vue project

@ankurk91
Copy link

webpack-dev-server Version: ^4.0.0-beta.1
still a full page reaload on a vue v2 project.

@alexander-akait
Copy link
Member

@ankurk91 Please provide reproducible test repo, your information is not help to help you

@ankurk91
Copy link

HMR is working fine for me now, with webpack-dev-server beta 2, and vue v2

@alexander-akait
Copy link
Member

Fixed in beta, stable release will be soon

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

4 participants