共用方式為


WebpackDevMiddleware.UseWebpackDevMiddleware 方法

定義

警告

Use Microsoft.AspNetCore.SpaServices.Extensions

啟用 Webpack 開發中介軟體支援。 這會在應用程式中的記憶體中裝載 Webpack 編譯器的實例,以便您隨時都能提供最新的 Webpack 建置資源,而不需要手動執行編譯器。 由於 Webpack 編譯器實例會保留在記憶體中,因此從頭開始重新執行編譯器的速度會大幅加快增量編譯。

不論磁片上的檔案為何,都會直接傳回 Webpack 編譯器輸出來處理符合 Webpack 建置檔案的傳入要求。 如果要求送達時正在進行編譯,回應會暫停,直到更新的編譯器輸出就緒為止。

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)

參數

options
WebpackDevMiddlewareOptions

設定 Webpack 編譯器實例的選項。

屬性

適用於