File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/Microsoft.AspNetCore.SpaServices/Webpack Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ public static class WebpackDevMiddleware
1515 {
1616 private const string DefaultConfigFile = "webpack.config.js" ;
1717
18+ private static readonly JsonSerializerSettings jsonSerializerSettings = new JsonSerializerSettings
19+ {
20+ ContractResolver = new CamelCasePropertyNamesContractResolver ( ) ,
21+ TypeNameHandling = TypeNameHandling . None
22+ } ;
23+
1824 /// <summary>
1925 /// Enables Webpack dev middleware support. This hosts an instance of the Webpack compiler in memory
2026 /// in your application so that you can always serve up-to-date Webpack-built resources without having
@@ -88,7 +94,7 @@ public static void UseWebpackDevMiddleware(
8894 } ;
8995 var devServerInfo =
9096 nodeServices . InvokeExportAsync < WebpackDevServerInfo > ( nodeScript . FileName , "createWebpackDevServer" ,
91- JsonConvert . SerializeObject ( devServerOptions , new JsonSerializerSettings ( ) { ContractResolver = new DefaultContractResolver ( ) } ) ) . Result ;
97+ JsonConvert . SerializeObject ( devServerOptions , jsonSerializerSettings ) ) . Result ;
9298
9399 // If we're talking to an older version of aspnet-webpack, it will return only a single PublicPath,
94100 // not an array of PublicPaths. Handle that scenario.
You can’t perform that action at this time.
0 commit comments