I am trying to use WebpackDevMiddleware with HotModuleReplacement in an ASP.NET Core application. I followed the following guide: https://docs.microsoft.com/en-us/aspnet/core/client-side/spa-services in setting up webpack to work with ASP.NET.
When I deploy my ASP.NET Core application through Service Fabric, the following error occurs:
Error calling Node module with error: Webpack dev middleware could not be executed due to error loading "aspnet-webpack" ....
I noticed that inside my wwwroot/ folder I don't have node_modules , dependencies, etc .... and so this error makes sense. The ASP.NET application core does not seem to have access to the aspnet-webpack Node module. In addition, a visible dependencies folder appears in the folders of other wwwroot projects, visible in Visual Studio, while I don't have such a folder.
I am wondering how can I give the main ASP.NET application access to the modules it needs?
source share