pmmmwh / react-refresh-webpack-plugin

A Webpack plugin to enable "Fast Refresh" (also previously known as Hot Reloading) for React components.
MIT License
3.15k stars 194 forks source link

Getting full page reload with error: Aborted because ... is not accepted #652

Open oncet opened 2 years ago

oncet commented 2 years ago

I'm trying to setup React Refresh but after following the documentation and trying it out I get this kind of error:

[HMR] Cannot apply update. Need to do a full reload! [HMR] Error: Aborted because ./src/Header.tsx is not accepted

I went through the troubleshooting guide but I can't find the root cause.

Tried adding module.hot.accept() here and there with no luck, I got rid of the error and the state is not lost but the React component is not reloaded.

Here is the repository:

Make sure to checkout to the with-babel branch.

vsinghipcium commented 2 years ago

+1