These types are not exported by webpack, but they are available to TypeScript consumers.
Options object as provided by the user.
Attributes
amd:
<object>Set the value of
require.amd
and
define.amd
. Or disable AMD support.bail:
<boolean>Report the first error as a hard error instead of tolerating it.
cache:
<boolean>
|
<FileCacheOptions>
|
<MemoryCacheOptions>Cache generated modules and chunks to improve performance for multiple incremental builds.
context:
<string>The base directory (absolute path!) for resolving the
entry
option. If
output.pathinfo
is set, the included pathinfo is shortened to this directory.dependencies:
<string[]>References to other configurations to depend on.
devtool:
<string>
|
<object[]>A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
dotenv:
<boolean>Enable and configure the Dotenv plugin to load environment variables from .env files.
entry:
<string>
|
<string[]>
|
<EntryObject>
|
<object>The entry point(s) of the compilation.
experiments:
{Experiments} Enables/Disables experiments (experimental features with relax SemVer compatibility).
extends:
<string>
|
<string[]>Extend configuration from another configuration (only works when using webpack-cli).
externals:
<string>
|
<RegExp>
|
<ExternalItemObjectKnown>
|
<ExternalItemObjectUnknown>
|
<object>
|
<object>
|
<ExternalItem[]>Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on
output.libraryTarget
.externalsPresets:
{ExternalsPresets} Enable presets of externals for specific targets.
externalsType:
{"asset"|"module"|"css-import"|"css-url"|"global"|"import"|"commonjs"|"jsonp"|"promise"|"this"|"var"|"assign"|"window"|"self"|"commonjs2"|"commonjs-module"|"commonjs-static"|"amd"|"amd-require"|"umd"|"umd2"|"system"|"module-import"|"script"|"node-commonjs"} Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
ignoreWarnings:
<RegExp>
|
<object>
|
<object[]>Ignore specific warnings.
infrastructureLogging:
{InfrastructureLogging} Options for infrastructure level logging.
loader:
{Loader} Custom values available in the loader context.
mode:
{"development"|"none"|"production"} Enable production optimizations or development hints.
module:
<ModuleOptions>Options affecting the normal modules (
NormalModuleFactory
).name:
<string>Name of the configuration. Used when loading multiple configurations.
node:
{false|NodeOptions} Include polyfills or mocks for various node stuff.
optimization:
{Optimization} Enables/Disables integrated optimizations.
output:
{Output} Options affecting the output of the compilation.
output
options tell webpack how to write the compiled files to disk.parallelism:
<number>The number of parallel processed modules in the compilation.
performance:
{false|PerformanceOptions} Configuration for web performance recommendations.
plugins:
<WebpackPluginInstance>
|
<object>
|
<null>
|
<undefined[]>Add additional plugins to the compiler.
profile:
<boolean>Capture timing information for each module.
recordsInputPath:
<string>Store compiler state to a json file.
recordsOutputPath:
<string>Load compiler state from a json file.
recordsPath:
<string>Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected.
recordsPath
is used for
recordsInputPath
and
recordsOutputPath
if they left undefined.resolve:
<ResolveOptions>Options for the resolver.
resolveLoader:
<ResolveOptions>Options for the resolver when resolving loaders.
snapshot:
{SnapshotOptionsWebpackOptions} Options affecting how file system snapshots are created and validated.
stats:
<boolean>
|
<StatsOptions>Stats options object or preset name.
target:
<string>
|
<string[]>Environment to build for. An array of environments to build for all of them when possible.
validate:
<boolean>Enable validation of webpack configuration. Defaults to true in development mode. In production mode, defaults to true unless futureDefaults is enabled, then defaults to false.
watch:
<boolean>Enter watch mode, which rebuilds on file change.
watchOptions:
{WatchOptions} Options for the watcher.
Attributes
parallelism:
<number>how many Compilers are allows to run at the same time in parallel
Normalized webpack options object.
Attributes
amd:
<object>Set the value of
require.amd
and
define.amd
. Or disable AMD support.bail:
<boolean>Report the first error as a hard error instead of tolerating it.
cache:
{CacheOptionsNormalized} Cache generated modules and chunks to improve performance for multiple incremental builds.
context:
<string>The base directory (absolute path!) for resolving the
entry
option. If
output.pathinfo
is set, the included pathinfo is shortened to this directory.dependencies:
<string[]>References to other configurations to depend on.
devServer:
<object>Options for the webpack-dev-server.
devtool:
<string>
|
<object[]>A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
dotenv:
<boolean>Enable and configure the Dotenv plugin to load environment variables from .env files.
entry:
<EntryNormalized>The entry point(s) of the compilation.
experiments:
{ExperimentsNormalized} Enables/Disables experiments (experimental features with relax SemVer compatibility).
externals:
<Externals>Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on
output.libraryTarget
.externalsPresets:
{ExternalsPresets} Enable presets of externals for specific targets.
externalsType:
{"asset"|"module"|"css-import"|"css-url"|"global"|"import"|"commonjs"|"jsonp"|"promise"|"this"|"var"|"assign"|"window"|"self"|"commonjs2"|"commonjs-module"|"commonjs-static"|"amd"|"amd-require"|"umd"|"umd2"|"system"|"module-import"|"script"|"node-commonjs"} Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
ignoreWarnings:
<object[]>Ignore specific warnings.
infrastructureLogging:
{InfrastructureLogging} Options for infrastructure level logging.
loader:
{Loader} Custom values available in the loader context.
mode:
{"development"|"none"|"production"} Enable production optimizations or development hints.
module:
{ModuleOptionsNormalized} Options affecting the normal modules (
NormalModuleFactory
).name:
<string>Name of the configuration. Used when loading multiple configurations.
node:
<Node>Include polyfills or mocks for various node stuff.
optimization:
{OptimizationNormalized} Enables/Disables integrated optimizations.
output:
{OutputNormalized} Normalized options affecting the output of the compilation.
output
options tell webpack how to write the compiled files to disk.parallelism:
<number>The number of parallel processed modules in the compilation.
performance:
{false|PerformanceOptions} Configuration for web performance recommendations.
plugins:
<WebpackPluginInstance>
|
<object[]>Add additional plugins to the compiler.
profile:
<boolean>Capture timing information for each module.
recordsInputPath:
<string>Store compiler state to a json file.
recordsOutputPath:
<string>Load compiler state from a json file.
resolve:
<ResolveOptions>Options for the resolver.
resolveLoader:
<ResolveOptions>Options for the resolver when resolving loaders.
snapshot:
{SnapshotOptionsWebpackOptions} Options affecting how file system snapshots are created and validated.
stats:
{StatsValue} Stats options object or preset name.
target:
<string>
|
<string[]>Environment to build for. An array of environments to build for all of them when possible.
validate:
<boolean>Enable validation of webpack configuration. Defaults to true in development mode. In production mode, defaults to true unless futureDefaults is enabled, then defaults to false.
watch:
<boolean>Enter watch mode, which rebuilds on file change.
watchOptions:
{WatchOptions} Options for the watcher.
Type:
{ReadonlyArray
|MultiCompilerOptions}