{Map<string, { column: number; line: number }>} source position (line is 1-based, column is 0-based) of each export's defining identifier in the original CSS, used to emit fine-grained JS-to-CSS source mappings
Only appends lines to the output. Avoids updating existing output e. g. for status messages. This option is only used when no custom console is provided.
{WritableStream & { columns?: number; isTTY?: boolean; rows?: number }} Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.
Check for incompatible wasm types when importing/exporting from/to ESM.
chunkIds:
<false>
|
<"size">
|
<"natural">
|
<"named">
|
<"deterministic">
|
<"total-size">
Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).
Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/"deterministic": generate short deterministic names optimized for caching, "size": generate the shortest possible names).
Enable minimizing the output. Uses optimization.minimizer.
minimizer:
[
<(false | "" | 0 | "..." | WebpackPluginInstance | ((this: Compiler, compiler: Compiler) => void) | null | undefined)>
]((false | "" | 0 | ".html#-0----webpackplugininstance--this-compiler-compiler-compiler--void--null--undefined)[] Minimizer(s) to use for minimizing the output.
moduleIds:
<false>
|
<"size">
|
<"natural">
|
<"named">
|
<"deterministic">
|
<"hashed">
Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).
Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects).
splitChunks:
<false>
|
<OptimizationSplitChunksOptions>
Optimize duplication and caching by splitting chunks by shared modules and cache group.
Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, "global": analyse exports globally for all runtimes combined).
Check for incompatible wasm types when importing/exporting from/to ESM.
chunkIds:
<false>
|
<"size">
|
<"natural">
|
<"named">
|
<"deterministic">
|
<"total-size">
Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).
Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/"deterministic": generate short deterministic names optimized for caching, "size": generate the shortest possible names).
Enable minimizing the output. Uses optimization.minimizer.
minimizer:
[
<("..." | WebpackPluginInstance | ((this: Compiler, compiler: Compiler) => void))>
]((".html#--webpackplugininstance--this-compiler-compiler-compiler--void)[] Minimizer(s) to use for minimizing the output.
moduleIds:
<false>
|
<"size">
|
<"natural">
|
<"named">
|
<"deterministic">
|
<"hashed">
Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).
Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects).
splitChunks:
<false>
|
<OptimizationSplitChunksOptions>
Optimize duplication and caching by splitting chunks by shared modules and cache group.
Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, "global": analyse exports globally for all runtimes combined).
{string | TemplatePathFn
} Specifies the filename template of output files of non-initial chunks on disk. You must
not
specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins).
The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
Check if to be emitted file already exists and have the same content before writing to output filesystem.
crossOriginLoading:
<false>
|
<"use-credentials">
|
<"anonymous">
This option enables cross-origin loading of chunks.
cssChunkFilename:
{string | TemplatePathFn
} Specifies the filename template of non-initial output css files on disk. You must
not
specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
cssFilename:
{string | TemplatePathFn
} Specifies the filename template of output css files on disk. You must
not
specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
| (context:
<ModuleFilenameTemplateContext>
) =>
<string>
Similar to
output.devtoolModuleFilenameTemplate
, but used in the case of duplicate module identifiers.
Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to
output.library
if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
The abilities of the environment where the webpack generated code should run.
filename:
{string | TemplatePathFn
} Specifies the filename of output files on disk. You must
not
specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
The filename of the Hot Update Main File. It is inside the 'output.path' directory.
htmlChunkFilename:
{string | TemplatePathFn
} Specifies the filename template of non-initial output html files on disk. You must
not
specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
htmlFilename:
{string | TemplatePathFn
} Specifies the filename template of output html files on disk. You must
not
specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
Worker public path. Much like the public path, this sets the location where the worker script file is intended to be found. If not set, webpack will use the publicPath. Don't set this option unless your worker scripts are located at a different path from your other script files.
The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
assetModuleFilename {string | TemplatePathFn} The filename of asset modules as relative path inside the 'output.path' directory.
asyncChunks<boolean> Enable/disable creating async chunks that are loaded on demand.
charset<boolean> Add charset attribute for script tag.
chunkFilename {string | TemplatePathFn} Specifies the filename template of output files of non-initial chunks on disk. You must not specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
chunkFormat<string> | <false> The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins).
chunkLoading<string> | <false> The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
chunkLoadingGlobal<string> The global variable used by webpack for loading of chunks.
chunkLoadTimeout<number> Number of milliseconds before chunk request expires.
compareBeforeEmit<boolean> Check if to be emitted file already exists and have the same content before writing to output filesystem.
crossOriginLoading<false> | <"use-credentials"> | <"anonymous"> This option enables cross-origin loading of chunks.
cssChunkFilename {string | TemplatePathFn} Specifies the filename template of non-initial output css files on disk. You must not specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
cssFilename {string | TemplatePathFn} Specifies the filename template of output css files on disk. You must not specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
devtoolFallbackModuleFilenameTemplate<string> | (context: <ModuleFilenameTemplateContext>) => <string> Similar to output.devtoolModuleFilenameTemplate, but used in the case of duplicate module identifiers.
devtoolNamespace<string> Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to output.library if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
enabledChunkLoadingTypes<string>[] List of chunk loading types enabled for use by entry points.
enabledLibraryTypes<string>[] List of library types enabled for use by entry points.
enabledWasmLoadingTypes<string>[] List of wasm loading types enabled for use by entry points.
environment<Environment> The abilities of the environment where the webpack generated code should run.
filename {string | TemplatePathFn} Specifies the filename of output files on disk. You must not specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
globalObject<string> An expression which is used to address the global object/scope in runtime code.
hashDigest<string> Digest types used for the hash.
hashDigestLength<number> Number of chars which are used for the hash.
hashFunction<string> | <typeof Hash> Algorithm used for generation the hash (see node.js crypto package).
hashSalt<string> Any string which is added to the hash to salt it.
hotUpdateChunkFilename<string> The filename of the Hot Update Chunks. They are inside the output.path directory.
hotUpdateGlobal<string> The global variable used by webpack for loading of hot update chunks.
hotUpdateMainFilename<string> The filename of the Hot Update Main File. It is inside the 'output.path' directory.
htmlChunkFilename {string | TemplatePathFn} Specifies the filename template of non-initial output html files on disk. You must not specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
htmlFilename {string | TemplatePathFn} Specifies the filename template of output html files on disk. You must not specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
ignoreBrowserWarnings<boolean> Ignore warnings in the browser.
iife<boolean> Wrap javascript code into IIFE's to avoid leaking into global scope.
importFunctionName<string> The name of the native import() function (can be exchanged for a polyfill).
importMetaName<string> The name of the native import.meta object (can be exchanged for a polyfill).
module<boolean> Output javascript files as module source type.
path<string> The output directory as absolute path (required).
pathinfo<boolean> | <"verbose"> Include comments with information about the modules.
publicPath {string | TemplatePathFn} The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
scriptType<false> | <"module"> | <"text/javascript"> This option enables loading async chunks via a custom script type, such as script type="module".
sourceMapFilename<string> The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.
sourcePrefix<string> Prefixes every line of the source in the bundle with this string.
strictModuleErrorHandling<boolean> Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.
strictModuleExceptionHandling<boolean> Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
trustedTypes<TrustedTypes> Use a Trusted Types policy to create urls for chunks.
uniqueName<string> A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
wasmLoading<string> | <false> The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
webassemblyModuleFilename<string> The filename of WebAssembly modules as relative path inside the 'output.path' directory.
workerChunkLoading<string> | <false> The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
workerPublicPath<string> Worker public path. Much like the public path, this sets the location where the worker script file is intended to be found. If not set, webpack will use the publicPath. Don't set this option unless your worker scripts are located at a different path from your other script files.
workerWasmLoading<string> | <false> The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
Helper function for joining two ranges into a single range. This is useful
when working with AST nodes, as it allows you to combine the ranges of child nodes
to create the range of the parent node.
Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.
Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.
onPolicyCreationFailure<"continue"> | <"stop"> If the call to trustedTypes.createPolicy(...) fails -- e.g., due to the policy name missing from the CSP trusted-types list, or it being a duplicate name, etc. -- controls whether to continue with loading in the hope that require-trusted-types-for 'script' isn't enforced yet, versus fail immediately. Default behavior is 'stop'.
policyName<string> The name of the Trusted Types policy created by webpack to serve bundle chunks.