10000 fix(webpack): fix middleware to specifically serialize options as non… · aspnet/JavaScriptServices@fc12d72 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit fc12d72

Browse files
stephenlautierSteveSandersonMS
authored andcommitted
fix(webpack): fix middleware to specifically serialize options as non-camecased
1 parent 372e597 commit fc12d72

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Microsoft.AspNetCore.SpaServices/Webpack/WebpackDevMiddleware.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Microsoft.AspNetCore.NodeServices;
55
using Microsoft.AspNetCore.SpaServices.Webpack;
66
using Newtonsoft.Json;
7+
using Newtonsoft.Json.Serialization;
78

89
namespace Microsoft.AspNetCore.Builder
910
{
@@ -87,7 +88,7 @@ public static void UseWebpackDevMiddleware(
8788
};
8889
var devServerInfo =
8990
nodeServices.InvokeExportAsync<WebpackDevServerInfo>(nodeScript.FileName, "createWebpackDevServer",
90-
JsonConvert.SerializeObject(devServerOptions)).Result;
91+
JsonConvert.SerializeObject(devServerOptions, new JsonSerializerSettings() { ContractResolver = new DefaultContractResolver() })).Result;
9192

9293
// If we're talking to an older version of aspnet-webpack, it will return only a single PublicPath,
9394
// not an array of PublicPaths. Handle that scenario.

0 commit comments

Comments
 (0)
0