aspnetcore-angular-universal: HMR not working?

I have problems with the updated version since splitting the monolithic webpack.config into multiple files. HMR seems to be broken. I say “seem” because I am clearly no expert on WebPack, but I had to revert my project back to the last version I pulled a few days ago. Here is what I get:

bildschirmfoto 2017-04-09 um 10 46 06

I am working on Windows (damn) and use Visual Studio 2017 but I can replicate this result on my Mac. The image taken is after pulling the repo and just run it from VS or dotnet run.

I tried my best to get down to the cause but my knowledge of WebPack … de facto does not exist. Too much has changed in the config file(s) and I get lost digging into the new ones 😦

Anyone else having this issue?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 26 (15 by maintainers)

Commits related to this issue

Most upvoted comments

@heqiao Try changing webpack.server.js as well. Here are my numbers:

Change Reload Time
Only HMR re-enabled 12 sec
Change client devtool to cheap-eval-source-map 9 sec
Change client and server devtool to cheap-eval-source-map 2 sec

Turns out it was fast with my changes before because I had disabled SSR, changing to awesome-typescript-loader instead of @ngtools/webpack with the client devtool change just brought it down to 6 sec with SSR enabled.

So I didn’t realize I had that code uncommented, so I just pushed it back in 😃

@mcm-ham Did you want to put in a PR to add those speed improvements? Would be greatly helpful for others! 🎁

Mainly because Vendor isn’t separated so it’s recompiling everything, I’ll add in the vendor chunking & polyfill chunking and maybe DDL support to really help speed things up!

I just stopped working on all that since there were bigger fish to fry for a bit 😃

@MarkPieszak Is there any way we can speed up the HMR? It is quite slow. I know there is a hell of a lot going on to be fair but it can sometimes take 20 seconds.