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

ReactRefresh does not hot reload when webpack config has multiple entry #254

Closed
vovakulikov opened this issue Nov 14, 2020 · 1 comment
Closed

Comments

@vovakulikov
Copy link

vovakulikov commented Nov 14, 2020

In case when we have for instance entry like below

code example №1

entry: {
   vendor: ['react', 'react-dom'],
   app: path.resolve(__dirname, './src/index.tsx'),
 }

React refresh does full reload for the page. but if we change the entry above on this with one entry

code example №2
entry: path.resolve(__dirname, './src/index.tsx')

Everything works as we are expecting - we have a local hot update at changed component without a full page refresh

A simple example of this problem can see here https://github.com/vovakulikov/sandbox - if add an entry to webpack.config.js like at code example №1 we will see a problem with a full refresh

@pmmmwh
Copy link
Owner

pmmmwh commented Nov 15, 2020

This should solve your problem :)

https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/docs/TROUBLESHOOTING.md#component-not-updating-with-bundle-splitting-techniques

@pmmmwh pmmmwh closed this as completed Dec 24, 2020
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