I am trying to use WebpackDevMiddleware with HotModuleReplacement in an ASP.NET Core app. 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 app via Service Fabric, the following error is thrown:
Call to Node module failed with error: Webpack dev middleware failed because of an error while loading 'aspnet-webpack'....
I noticed that inside my wwwroot/ folder, I have no node_modules, dependencies, etc... and so this error seems to make sense. The ASP.NET core app does not seem to have access to the aspnet-webpack node module. Additionally, in other projects' wwwroot folders there appears to be a dependencies folder visible in Visual Studio, while in mine there is no such folder.
I'm wondering how I can give the ASP.NET core app access to the modules it needs?