mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-24 10:40:23 +00:00
Design review: Change AddNodeServices to take an Action<NodeServicesOptions> like other aspects of MVC DI config
This commit is contained in:
@@ -40,12 +40,9 @@ namespace Microsoft.AspNetCore.Builder
|
||||
// because it must *not* restart when files change (if it did, you'd lose all the benefits of Webpack
|
||||
// middleware). And since this is a dev-time-only feature, it doesn't matter if the default transport isn't
|
||||
// as fast as some theoretical future alternative.
|
||||
var nodeServices = Configuration.CreateNodeServices(
|
||||
appBuilder.ApplicationServices,
|
||||
new NodeServicesOptions
|
||||
{
|
||||
WatchFileExtensions = new string[] { } // Don't watch anything
|
||||
});
|
||||
var nodeServicesOptions = new NodeServicesOptions(appBuilder.ApplicationServices);
|
||||
nodeServicesOptions.WatchFileExtensions = new string[] {}; // Don't watch anything
|
||||
var nodeServices = NodeServicesFactory.CreateNodeServices(nodeServicesOptions);
|
||||
|
||||
// Get a filename matching the middleware Node script
|
||||
var script = EmbeddedResourceReader.Read(typeof(WebpackDevMiddleware),
|
||||
|
||||
Reference in New Issue
Block a user