File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
src/Microsoft.AspNetCore.SpaServices/Webpack Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,14 @@ public static void UseWebpackDevMiddleware(
47
47
nodeServicesOptions . ProjectPath = options . ProjectPath ;
48
48
}
49
49
50
+ if ( options . EnvironmentVariables != null )
51
+ {
52
+ foreach ( var kvp in options . EnvironmentVariables )
53
+ {
54
+ nodeServicesOptions . EnvironmentVariables [ kvp . Key ] = kvp . Value ;
55
+ }
56
+ }
57
+
50
58
var nodeServices = NodeServicesFactory . CreateNodeServices ( nodeServicesOptions ) ;
51
59
52
60
// Get a filename matching the middleware Node script
Original file line number Diff line number Diff line change
1
+ using System . Collections . Generic ;
2
+
1
3
namespace Microsoft . AspNetCore . SpaServices . Webpack
2
4
{
3
5
public class WebpackDevMiddlewareOptions
@@ -7,5 +9,6 @@ public class WebpackDevMiddlewareOptions
7
9
public bool ReactHotModuleReplacement { get ; set ; }
8
10
public string ConfigFile { get ; set ; }
9
11
public string ProjectPath { get ; set ; }
12
+ public IDictionary < string , string > EnvironmentVariables { get ; set ; }
10
13
}
11
14
}
You can’t perform that action at this time.
0 commit comments