-
Notifications
You must be signed in to change notification settings - Fork 194
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
Webpack 5 with browserslist config breaks react-refresh plugin #235
Comments
This seems to be related: |
This is unfortunately a problem from upstream - no code in the plugin is specific for the web and would stay that way. |
hyochan
added a commit
to hyochan/dooboo-frontend-ts
that referenced
this issue
Nov 3, 2020
hyochan
added a commit
to hyochan/dooboo-frontend-ts
that referenced
this issue
Nov 3, 2020
Update packages and migrate to webpack5. We had an issue in react-fast-refresh on webpack5 but could resolve this issue with the workaround given in pmmmwh/react-refresh-webpack-plugin#235.
This have been resolved in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Versions
"webpack": "5.1.3",
"webpack-cli": "4.1.0",
"webpack-dev-server": "3.11.0"
"@pmmmwh/react-refresh-webpack-plugin": "0.4.2"
"react-refresh": "0.9.0",
Since updateing to webpack 5 react-refresh plugin stops working. Looks like it has something to to with the target in webpack being set to
target: browserslist
when browserslist config is present in repository. This is new in webpack 5It can be reproduced by ether adding
.browserlistrc
orbrowserslist to package.json
I could be that this is some issue with react-refresh, but ill try my luck here first :)
Workaround is to explicit set
target: 'web'
when in development in webpack config.Test repo: https://github.com/bentrynning/react-refresh
The text was updated successfully, but these errors were encountered: