mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2026-02-09 09:35:56 +00:00
Design review: Always instantiate via DI
This commit is contained in:
@@ -33,10 +33,9 @@ namespace Microsoft.AspNetCore.SpaServices.Prerendering
|
||||
// in your startup file, but then again it might be confusing that you don't need to.
|
||||
if (_nodeServices == null)
|
||||
{
|
||||
_nodeServices = _fallbackNodeServices = Configuration.CreateNodeServices(new NodeServicesOptions
|
||||
{
|
||||
ProjectPath = _applicationBasePath
|
||||
}.AddDefaultEnvironmentVariables(hostEnv.IsDevelopment()));
|
||||
_nodeServices = _fallbackNodeServices = Configuration.CreateNodeServices(
|
||||
serviceProvider,
|
||||
new NodeServicesOptions());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user