Skip to content

JavascriptServices Hot Module Replacement (HMR) Doesn't Work With InProcess Hosting Model #7253

Closed
@DanielStout5

Description

@DanielStout5

Describe the bug

Hot Module Replacement (HMR) for my JS single page application was working fine until I added InProcess to my csproj. After that, it fails to reload when changes are made in the project.

The browser console still says [HMR] connected as before

NodeServices still outputs webpack built 4e73e4e1deb48362321c in 223ms as before

But the browser console now never says [HMR] bundle rebuilding so the changes are never applied.

I've tried the solutions from this issue #4547 regarding Environment.CurrentDirectory, but even when I set it to the same value it has when it's running as OutOfProcess (Environment.CurrentDirectory = Directory.GetParent(AppContext.BaseDirectory).Parent.Parent.Parent.FullName;) HMR still doesn't work.

Commenting out the AspNetCoreHostingModel line from the csproj makes HMR work again.

Versions:

  • .Net Core 2.2.103
  • Visual Studio 2017 15.9.6
  • aspnet-webpack 2.0.1
  • webpack-hot-middleware 2.12.2
  • webpack 2.7.0

I've tried updating aspnet-webpack but that caused additional issues.

Metadata

Metadata

Assignees

Labels

area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-iisIncludes: IIS, ANCM

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions