Dela via


WebpackDevMiddlewareOptions Class

Definition

Caution

Use Microsoft.AspNetCore.SpaServices.Extensions

Options for configuring a Webpack dev middleware compiler.

public ref class WebpackDevMiddlewareOptions
public class WebpackDevMiddlewareOptions
[System.Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")]
public class WebpackDevMiddlewareOptions
type WebpackDevMiddlewareOptions = class
[<System.Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")>]
type WebpackDevMiddlewareOptions = class
Public Class WebpackDevMiddlewareOptions
Inheritance
WebpackDevMiddlewareOptions
Attributes

Constructors

WebpackDevMiddlewareOptions()

Properties

ConfigFile

Specifies the Webpack configuration file to be used. If not set, defaults to 'webpack.config.js'.

EnvironmentVariables

Specifies additional environment variables to be passed to the Node instance hosting the webpack compiler.

EnvParam

Specifies a value for the "env" parameter to be passed into the Webpack configuration function. The value must be JSON-serializable, and will only be used if the Webpack configuration is exported as a function.

HotModuleReplacement

If true, hot module replacement (HMR) will be enabled. This automatically updates Webpack-built resources (such as JavaScript, CSS, or images) in your web browser whenever source files are changed.

HotModuleReplacementClientOptions

Specifies additional options to be passed to the Webpack Hot Middleware client, if used.

HotModuleReplacementEndpoint

If set, overrides the URL that Webpack's client-side code will connect to when listening for updates. This must be a root-relative URL similar to "/__webpack_hmr" (which is the default endpoint).

HotModuleReplacementServerPort

Overrides the internal port number that client-side HMR code will connect to.

ProjectPath

The root path of your project. Webpack runs in this context.

ReactHotModuleReplacement

If true, enables React-specific extensions to Webpack's hot module replacement (HMR) feature. This enables React components to be updated without losing their in-memory state.

Applies to