How to Configure WebpackDevServer to run an app with ASP.NET CORE 2.0 IISEXPRESS

倖福魔咒の 提交于 2019-12-11 15:38:37

问题


Using the ASP.NET Core 2.0 template for creating react app with redux i want to use the webpack-dev-server which is used in the react CRA (CREATE REACT APP) .

The ASP.NET Core 2.0 app build outputs to a js (Client/Server) file and renders it on a razor page. (cshtml ) (SSR) which on run (F5) runs using the IISEXPRESS.

I want to run the same using IISEXPRESS but using the WebpackDevServer since the execution in it faster especially after the initial build .

I have tried the following by adding a proxy to my package.json

The template provides a way to do server side rendering of react app. The goal is to have a faster incremental build on changes to files since i have a lot of files .

The app when run with the same code using Create React App renders faster without any issues.

On the other hand the default HMR (Hot Module Replacement) given by the ASP.NET Core template renders sometimes and throws an error, where in we would need to rebuild the entire thing once again consuming a lot of time.

Anyway i could get the WebPackDevServer to work with IISExpress ? Thanks in Advance for any pointers regarding the same.

来源:https://stackoverflow.com/questions/54216912/how-to-configure-webpackdevserver-to-run-an-app-with-asp-net-core-2-0-iisexpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!