mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Support specifying environment variables for the Webpack dev middleware Node instance. Resolves #311.
This commit is contained in:
@@ -47,6 +47,14 @@ namespace Microsoft.AspNetCore.Builder
|
||||
nodeServicesOptions.ProjectPath = options.ProjectPath;
|
||||
}
|
||||
|
||||
if (options.EnvironmentVariables != null)
|
||||
{
|
||||
foreach (var kvp in options.EnvironmentVariables)
|
||||
{
|
||||
nodeServicesOptions.EnvironmentVariables[kvp.Key] = kvp.Value;
|
||||
}
|
||||
}
|
||||
|
||||
var nodeServices = NodeServicesFactory.CreateNodeServices(nodeServicesOptions);
|
||||
|
||||
// Get a filename matching the middleware Node script
|
||||
|
||||
Reference in New Issue
Block a user