Always override JsonSerializerSettings; don't use defaults as they might be nonstandard #1009

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

Originally created by @senritsu on 2/16/2017

With a setup according to the documentation in the readme (here and here) HMR doesn't seem to work at all.

The server is running dot net core SDK 1.1 and the bundles are built with webpack@latest (2.x). Server runs in development mode.

The dev middleware itself seems to work well enough, even though it does generate files on disk inside the publicPath folder specified in the webpack config (the somewhat default wwwroot/dist/). According to the docs it should serve from memory, so that by itself is a bit unexpected already.

Even with HotModuleReplacement = true in the middleware options and/or the HotModuleReplacementPlugin plugin in the webpack config, nothing changes. The HMR connection message in the browser console never appears, and it does not react to source changes in any way other than just rebuilding the bundles. Reloading the page manually correctly loads the updated bundles.

Is there something missing from the docs that could result in the HMR middleware not being run correctly?

In an older issue (#603) someone reported it started working after he reinstalled VS and .NET, something i haven't tried yet due to the time it takes to do so, but i will check it from a different PC to see if this might be the same issue.

*Originally created by @senritsu on 2/16/2017* With a setup according to the documentation in the readme ([here](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#webpack-dev-middleware) and [here](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#webpack-hot-module-replacement)) HMR doesn't seem to work at all. The server is running dot net core SDK 1.1 and the bundles are built with webpack@latest (2.x). Server runs in development mode. The dev middleware itself seems to work well enough, even though it does generate files on disk inside the `publicPath` folder specified in the webpack config (the somewhat default `wwwroot/dist/`). According to the docs it should serve from memory, so that by itself is a bit unexpected already. Even with `HotModuleReplacement = true` in the middleware options and/or the `HotModuleReplacementPlugin` plugin in the webpack config, nothing changes. The HMR connection message in the browser console never appears, and it does not react to source changes in any way other than just rebuilding the bundles. Reloading the page manually correctly loads the updated bundles. Is there something missing from the docs that could result in the HMR middleware not being run correctly? In an older issue (#603) someone reported it started working after he reinstalled VS and .NET, something i haven't tried yet due to the time it takes to do so, but i will check it from a different PC to see if this might be the same issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1009
No description provided.