-
Notifications
You must be signed in to change notification settings - Fork 28
I got HMR working #6
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
Comments
Gr8 news! I used this with Webpack 3 but after 4 was released it was broken. Will try to implement it again and release the new version. I'll leave this issue open until then. Thank you! |
This should make HMR work again with webpack 4.0+: Node packages:
webpack.config.js
Startup.cs
|
Thanks for all your inputs, that got me going. However, I face an inconvenience that I'd like to fix - namely, the hot reload takes about 10-15 seconds on this rather empty project. How could I make this faster? I am not sure how to even start improving this time? |
@livanov That is not "normal" time of execution. I have plans to add HMR and update the template to the .NET Core 3 but I am lacking the free time to do so. You can use standard way of development. Watching for changes feature of the current template takes under a second to build the files. Downside is that, yes, you have to hit F5 manually. |
Just a heads up.
I saw your previous #5 issue on HMR not working.
I added the following to the Startup.Configure method.
using Microsoft.AspNetCore.SpaServices.Webpack;
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { HotModuleReplacement = true });
Once I do this, HMR works just fine. I don't have to hit F5 all I have to do is hit save.
The text was updated successfully, but these errors were encountered: