WebpackDevMiddleware should run in a separate Node instance that doesn't restart when files change (otherwise there's no point in running it at all)

This commit is contained in:
SteveSandersonMS
2016-02-09 17:26:04 -08:00
parent 6c903f33ae
commit 2e9a43d1dc
6 changed files with 76 additions and 24 deletions

View File

@@ -34,7 +34,10 @@ namespace Microsoft.AspNet.AngularServices
// in your startup file, but then again it might be confusing that you don't need to.
if (this.nodeServices == null) {
var appEnv = (IApplicationEnvironment)serviceProvider.GetService(typeof (IApplicationEnvironment));
this.nodeServices = fallbackNodeServices = Configuration.CreateNodeServices(NodeHostingModel.Http, appEnv.ApplicationBasePath);
this.nodeServices = fallbackNodeServices = Configuration.CreateNodeServices(new NodeServicesOptions {
HostingModel = NodeHostingModel.Http,
ProjectPath = appEnv.ApplicationBasePath
});
}
}