-
Notifications
You must be signed in to change notification settings - Fork 801
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
Multiple Entry Points #141
Comments
Just do it normally, but make sure each entry point has {
entryPointA: ['./entryPointA', 'webpack/hot/only-dev-server'],
entryPointB: ['./entryPointB', 'webpack/hot/only-dev-server'],
devServerClient: 'webpack-dev-server/client?http://0.0.0.0:3000'
} |
(You're welcome to PR the docs!) |
I've taken this approach to my app but it seems to trigger all of my entry points to be re-processed with every update. I'm used to working with webpack-dev-server where updating one file simply shows that one file was updated, but for some reason when I update a file when using this approach/syntax with react-hot-loader I get the same output in the console as I do when I first fire up the new RHL'd webpack-dev-server. Is there something I'm missing that could allow me to use multiple entry points, but not have all of the files re-checked by a single file update? |
@Surreal9 I don't know :-(. You can probably ask around in Webpack's Gitter room or repo. |
@Surreal9 Did you ever find more information or a resolution to that? |
Unfortunately not really.. I basically decided there was no benefit to switching over my main project to RHL since it was taking just as long to 'hot-load' as it was in doing a plain old refresh which was already built in with webpack-dev-server (due to RHL re-building the entire bundle each time). I have since re-visited RHL in a new project, but I unfortunately see the same behaviour, (of re-building the entire bundle every time), even though this project only uses a single entry point. I've just decided to live with it. |
I was linked to webpack/webpack#669 though, which remains open, so maybe that's still related |
Just a quick note on here. I couldn't get it to work using the answer provided by gaeron (#141 (comment)). But this worked:
Since that worked, I didn't bother to look into why that worked while the answer given previously did not work. |
@gaearon good answer! you have solved my problem 👯 |
@dcefram This actually works. |
It is better not to separate hmr related code in a different entry chunk if you are developing with Django and using django-wepack-loader. |
I have fixed hot-reloading with multiple entry points in my project by removing babel-polyfill from all entries in webpack.config.dev.js and using config like in the example above/ |
I had the same issue, added these lines but it didn't work. - Had to add (both) .js files to the index.html and then hot-reloading worked. |
I have the same problem, any solutions? |
@SunShinewyf this problem shall not exists in 2020. Please refer to webpack-dev-server documentation. |
Looking at the docs, it seems to assume that there's only one entry point. Are there plans to support multi-page apps that have multiple entry points?
The text was updated successfully, but these errors were encountered: