WebpackDevMiddleware.UseWebpackDevMiddleware Method

Definition

Caution

Use Microsoft.AspNetCore.SpaServices.Extensions

Enables Webpack dev middleware support. This hosts an instance of the Webpack compiler in memory in your application so that you can always serve up-to-date Webpack-built resources without having to run the compiler manually. Since the Webpack compiler instance is retained in memory, incremental compilation is vastly faster that re-running the compiler from scratch.

Incoming requests that match Webpack-built files will be handled by returning the Webpack compiler output directly, regardless of files on disk. If compilation is in progress when the request arrives, the response will pause until updated compiler output is ready.

public static void UseWebpackDevMiddleware (this Microsoft.AspNetCore.Builder.IApplicationBuilder appBuilder, Microsoft.AspNetCore.SpaServices.Webpack.WebpackDevMiddlewareOptions options = default);
[System.Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")]
public static void UseWebpackDevMiddleware (this Microsoft.AspNetCore.Builder.IApplicationBuilder appBuilder, Microsoft.AspNetCore.SpaServices.Webpack.WebpackDevMiddlewareOptions options = default);
static member UseWebpackDevMiddleware : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.SpaServices.Webpack.WebpackDevMiddlewareOptions -> unit
[<System.Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")>]
static member UseWebpackDevMiddleware : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.SpaServices.Webpack.WebpackDevMiddlewareOptions -> unit
<Extension()>
Public Sub UseWebpackDevMiddleware (appBuilder As IApplicationBuilder, Optional options As WebpackDevMiddlewareOptions = Nothing)

Parameters

options
WebpackDevMiddlewareOptions

Options for configuring the Webpack compiler instance.

Attributes

Applies to