Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • WebpackPluginConfig

Index

Properties

devContentSecurityPolicy?: string

Sets the Content-Security-Policy header for the Webpack development server.

Normally you would want to only specify this as a <meta> tag. However, in development mode, the Webpack plugin uses the devtool: eval-source-map source map setting for efficiency purposes. This requires the 'unsafe-eval' source for the script-src directive that wouldn't normally be recommended to use. If this value is set, make sure that you keep this directive-source pair intact if you want to use source maps.

Default: default-src 'self' 'unsafe-inline' data:; script-src 'self' 'unsafe-eval' 'unsafe-inline' data:

devServer?: Record<string, unknown>

Overrides for webpack-dev-server options.

The following options cannot be overridden here:

  • port (use the port config option)
  • static
  • setupExitSignals
  • headers.Content-Security-Policy (use the devContentSecurityPolicy config option)
jsonStats?: boolean

Instructs webpack to emit a JSON file containing statistics about modules, the dependency graph, and various other build information for the main process. This file is located in .webpack/main/stats.json, but is not packaged with your app.

loggerPort?: number

The TCP port for web-multi-logger. Defaults to 9000.

mainConfig: string | WebpackConfiguration

The webpack config for your main process

packageSourceMaps?: boolean

In the event that webpack has been configured with devtool: sourcemap (or any other option which results in .map files being generated), this option will cause the source map files be packaged with your app. By default they are not included.

port?: number

The TCP port for the dev servers. Defaults to 3000.

renderer: WebpackPluginRendererConfig

Electron Forge webpack configuration for your renderer process