Enables/Disables integrated optimizations.
booleanAvoid wrapping the entry module in an IIFE.
booleanCheck for incompatible wasm types when importing/exporting from/to ESM.
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).
boolean | ConcatenateModulesOptionsConcatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer. An options object implies 'true'.
booleanEmit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.
booleanAlso flag chunks as loaded which contain a subset of the modules.
booleanInline ESM exports that bind to small primitive constants (≤6-byte null/undefined/boolean/number/string). Inlining makes the import dependency inactive so DCE can drop the export and possibly the module.
booleanCreates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.
boolean | "size" | "deterministic"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).
booleanReduce size of WASM by changing imports to shorter strings.
booleanMerge chunks which contain the same modules.
booleanEnable minimizing the output. Uses optimization.minimizer.
("..." | WebpackPluginInstance | ((this: Compiler, compiler: Compiler) => void))[]Minimizer(s) to use for minimizing the output.
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).
string | falseSet process.env.NODE_ENV to a specific value.
booleanAvoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).
booleanGenerate records with relative paths to be able to move the context folder.
booleanFigure out which exports are provided by modules to generate more efficient code.
booleanUse real [contenthash] based on final content of the assets.
booleanRemoves modules from chunks when these modules are already included in all parents.
booleanRemove chunks which are empty.
false | ObjectCreate an additional chunk which contains only the webpack runtime and chunk hash maps.
optimizationNormalized.runtimeChunk.name(entrypoint): string
The name factory for the runtime chunks.
boolean | "flag"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).
false | OptimizationSplitChunksOptionsOptimize duplication and caching by splitting chunks by shared modules and cache group.
boolean | "global"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).