This repository was archived by the owner on Apr 8, 2020. It is now read-only.
File tree 2 files changed +9
-1
lines changed
src/Microsoft.AspNetCore.SpaServices/Webpack
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,9 @@ public static void UseWebpackDevMiddleware(
78
78
// Ideally, this would be relative to the application's PathBase (so it could work in virtual directories)
79
79
// but it's not clear that such information exists during application startup, as opposed to within the context
80
80
// of a request.
81
- var hmrEndpoint = "/__webpack_hmr" ;
81
+ var hmrEndpoint = ! string . IsNullOrEmpty ( options . HotModuleReplacementEndpoint )
82
+ ? options . HotModuleReplacementEndpoint
83
+ : "/__webpack_hmr" ; // Matches webpack's built-in default
82
84
83
85
// Tell Node to start the server hosting webpack-dev-middleware
84
86
var devServerOptions = new
Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ public class WebpackDevMiddlewareOptions
13
13
/// </summary>
14
14
public bool HotModuleReplacement { get ; set ; }
15
15
16
+ /// <summary>
17
+ /// If set, overrides the URL that Webpack's client-side code will connect to when listening for updates.
18
+ /// This must be a root-relative URL similar to "/__webpack_hmr" (which is the default endpoint).
19
+ /// </summary>
20
+ public string HotModuleReplacementEndpoint { get ; set ; }
21
+
16
22
/// <summary>
17
23
/// Overrides the internal port number that client-side HMR code will connect to.
18
24
/// </summary>
You can’t perform that action at this time.
0 commit comments