HMR runs in production? #1432

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

Originally created by @onethread on 8/15/2016

I noticed when I run my site through the CLI in production mode, that the site will still continue to seek out an webpack HMR instance. I wasn't sure if this was by design or not, but after reading around the documentation, I assume it's not. I tried running the MusicStore sample through the CLI as well, and get the same error (listed below).

I assume the intended guidance is to remove the asp-prerender-webpack-config tag in production with environment blocks?

λ dotnet run
Project Microsoft.AspNetCore.NodeServices (.NETStandard,Version=v1.3) was previously compiled. Skipping compilation.
Project Microsoft.AspNetCore.SpaServices (.NETStandard,Version=v1.6) was previously compiled. Skipping compilation.
Project MusicStore (.NETCoreApp,Version=v1.0) will be compiled because expected inputs are missing
Compiling MusicStore for .NETCoreApp,Version=v1.0

Compilation succeeded.
    0 Warning(s)
    0 Error(s)

Time elapsed 00:00:06.2134454


Hosting environment: "Production"
Content root path: C:\Users\Source\Repos\JavaScriptServices\samples\react\MusicStore
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost:5000/__webpack_hmr
*Originally created by @onethread on 8/15/2016* I noticed when I run my site through the CLI in production mode, that the site will still continue to seek out an webpack HMR instance. I wasn't sure if this was by design or not, but after reading around the documentation, I assume it's not. I tried running the MusicStore sample through the CLI as well, and get the same error (listed below). I assume the intended guidance is to remove the `asp-prerender-webpack-config` tag in production with environment blocks? ``` λ dotnet run Project Microsoft.AspNetCore.NodeServices (.NETStandard,Version=v1.3) was previously compiled. Skipping compilation. Project Microsoft.AspNetCore.SpaServices (.NETStandard,Version=v1.6) was previously compiled. Skipping compilation. Project MusicStore (.NETCoreApp,Version=v1.0) will be compiled because expected inputs are missing Compiling MusicStore for .NETCoreApp,Version=v1.0 Compilation succeeded. 0 Warning(s) 0 Error(s) Time elapsed 00:00:06.2134454 Hosting environment: "Production" Content root path: C:\Users\Source\Repos\JavaScriptServices\samples\react\MusicStore Now listening on: http://localhost:5000 Application started. Press Ctrl+C to shut down. info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 GET http://localhost:5000/__webpack_hmr ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1432
No description provided.