Consider a different way for hot module replacement #1661

Closed
opened 2025-08-09 17:21:11 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @xabikos on 2/2/2016

During going over the last commits I saw that there is an attempt to enable the hot module replacement something which is very nice. I am very interested on the subject as it adds tremendous flexibility during development.

For the same purposes I have created a small nugget package dedicated for that reason. It's called aspnet-webpack and it's enabled pretty much the same way as the approach on that repo. But I tried to simplify it by just using the webpack-dev-server module and not just the middleware. On top of that the package call the dev server with cli arguments so the presence of an external config file is not always required. And when there is a need for a file the library creates and maintains it. At the end based on the configuration the middleware intercepts the request and adds the appropriate script tag on the html page so the developer doesn't have to do that as well.

I would be interested to hear your thoughts about this.

*Originally created by @xabikos on 2/2/2016* During going over the last commits I saw that there is an attempt to enable the hot module replacement something which is very nice. I am very interested on the subject as it adds tremendous flexibility during development. For the same purposes I have created a small nugget package dedicated for that reason. It's called [aspnet-webpack](https://github.com/xabikos/aspnet-webpack) and it's enabled pretty much the same way as the approach on that repo. But I tried to simplify it by just using the webpack-dev-server module and not just the middleware. On top of that the package call the dev server with cli arguments so the presence of an external config file is not always required. And when there is a need for a file the library creates and maintains it. At the end based on the configuration the middleware intercepts the request and adds the appropriate script tag on the html page so the developer doesn't have to do that as well. I would be interested to hear your thoughts about this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1661
No description provided.