webpack is configured with an options object, usually exported from a webpack.config.js file. Every build validates that object against the options schema (schemas/WebpackOptions.json), so unknown or malformed options fail with a descriptive error. This page is generated from that schema and lists every supported option; named types link to their full definitions in the API documentation.
Set the value of require.amd and define.amd. Or disable AMD support.
false | objectReport the first error as a hard error instead of tolerating it.
booleanCache generated modules and chunks to improve performance for multiple incremental builds.
true | false | MemoryCacheOptions | FileCacheOptionsThe base directory (absolute path!) for resolving the entry option. If output.pathinfo is set, the included pathinfo is shortened to this directory.
stringReferences to other configurations to depend on.
string[]Options for the webpack-dev-server.
false | objectA developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
Enable and configure the Dotenv plugin to load environment variables from .env files.
boolean | DotenvPluginOptionsThe directory from which .env files are loaded. Can be an absolute path, false will disable the .env file loading.
false | stringOnly expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'.
Template patterns for .env file names. Use [mode] as placeholder for the webpack mode. Defaults to ['.env', '.env.local', '.env.[mode]', '.env.[mode].local'].
string[]The entry point(s) of the compilation.
RawEntryDynamic | EntryObject | string[] | stringEnables/Disables experiments (experimental features with relax SemVer compatibility).
ExperimentsSupport WebAssembly as asynchronous EcmaScript Module.
booleanEnable backward-compat layer with deprecation warnings for many webpack 4 APIs.
booleanBuild http(s): urls using a lockfile and resource content cache.
(RegExp | string | AllowedUriFn)[] | HttpUriOptionsfalse | stringbooleanstringstringbooleanEnable additional in memory caching of modules that are unchanged and reference only unchanged modules.
booleanEnable css support.
booleanEnable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.
booleanApply defaults of next major version.
booleanEnable experimental HTML support. This flag does not by itself make .html files usable directly as entry points without additional HTML handling.
booleanCompile entrypoints and import()s only when they are accessed.
boolean | LazyCompilationOptionsBackEnd | LazyCompilationDefaultBackendOptionsbooleanbooleanAllow output javascript files as module source type.
booleanEnable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
booleanSupport WebAssembly as synchronous EcmaScript Module (outdated).
booleanEnable typescript support.
booleanExtend configuration from another configuration (only works when using webpack-cli).
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.
Specify externals depending on the layer.
object | ExternalItemByLayerFnEnable presets of externals for specific targets.
ExternalsPresetsTreat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used.
booleanTreat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.
booleanTreat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
booleanTreat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
booleanTreat node.js built-in modules like fs, path or vm as external and load them via require() when used.
booleanTreat NW.js legacy nw.gui module as external and load it via require() when used.
booleanTreat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).
booleanTreat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution).
booleanSpecifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
"var" | "module" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "promise" | "import" | "module-import" | "script" | "node-commonjs" | "asset" | "asset-url" | "css-import" | "css-url"Ignore specific warnings.
Options for infrastructure level logging.
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.
booleanEnables/Disables colorful output. This option is only used when no custom console is provided.
booleanCustom console used for logging.
ConsoleEnable debug logging for specific loggers.
Log level.
"none" | "error" | "warn" | "info" | "log" | "verbose"Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.
NodeJS.WritableStream & { isTTY?: boolean, columns?: number, rows?: number }Custom values available in the loader context.
LoaderEnable production optimizations or development hints.
"development" | "production" | "none"Options affecting the normal modules (NormalModuleFactory).
ModuleOptionsAn array of rules applied by default for modules.
("..." | false | 0 | '' | null | undefined | RuleSetRule)[]Enable warnings for full dynamic dependencies.
booleanEnable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.
booleanSets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.
Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.
stringSpecify options for each generator.
AssetGeneratorOptionsEmptyGeneratorOptionsAssetInlineGeneratorOptionsAssetResourceGeneratorOptionsEmptyGeneratorOptionsCssModuleGeneratorOptionsCssModuleGeneratorOptionsCssModuleGeneratorOptionsHtmlGeneratorOptionsEmptyGeneratorOptionsEmptyGeneratorOptionsEmptyGeneratorOptionsEmptyGeneratorOptionsJsonGeneratorOptionsDon't parse files matching. It's matched against the full resolved request.
Specify options for each parser.
AssetParserOptionsEmptyParserOptionsEmptyParserOptionsEmptyParserOptionsEmptyParserOptionsCssParserOptionsCssAutoOrModuleParserOptionsCssModuleParserOptionsCssAutoOrModuleParserOptionsJavascriptParserOptionsJavascriptParserOptionsJavascriptParserOptionsJavascriptParserOptionsJsonParserOptionsAn array of rules applied for modules.
("..." | false | 0 | '' | null | undefined | RuleSetRule)[]Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.
booleanHandle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.
booleanEnable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.
booleanEnable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'.
booleanSets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'.
Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'.
stringCache the resolving of module requests.
boolean | UnsafeCachePredicateEnable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.
booleanEnable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.
booleanSet the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.
RegExpName of the configuration. Used when loading multiple configurations.
stringInclude polyfills or mocks for various node stuff.
false | NodeOptionsInclude a polyfill for the '__dirname' variable.
false | true | "warn-mock" | "mock" | "node-module" | "eval-only"Include a polyfill for the '__filename' variable.
false | true | "warn-mock" | "mock" | "node-module" | "eval-only"Include a polyfill for the 'global' variable.
false | true | "warn"Enables/Disables integrated optimizations.
OptimizationAvoid wrapping the entry module in an IIFE.
booleanCheck for incompatible wasm types when importing/exporting from/to ESM.
booleanDefine 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).
"natural" | "named" | "deterministic" | "size" | "total-size" | falseConcatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.
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.
booleanCreates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.
booleanRename 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).
"size" | "deterministic" | booleanReduce size of WASM by changing imports to shorter strings.
booleanMerge chunks which contain the same modules.
booleanEnable minimizing the output. Uses optimization.minimizer.
booleanMinimizer(s) to use for minimizing the output.
("..." | false | 0 | '' | null | undefined | WebpackPluginInstance | WebpackPluginFunction)[]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).
"natural" | "named" | "hashed" | "deterministic" | "size" | falseAvoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).
booleanSet process.env.NODE_ENV to a specific value.
false | stringGenerate 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.
booleanCreate an additional chunk which contains only the webpack runtime and chunk hash maps.
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).
"flag" | booleanOptimize duplication and caching by splitting chunks by shared modules and cache group.
false | OptimizationSplitChunksOptionsstringobject"initial" | "async" | "all" | RegExp | ChunkFilterFnSourceType[]objectstring | TemplatePathFn<PathDataChunk>booleannumbernumbernumberfalse | string | GetNameFnbooleanFigure 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).
"global" | booleanOptions affecting the output of the compilation. output options tell webpack how to write the compiled files to disk.
OutputstringThe filename of asset modules as relative path inside the 'output.path' directory.
string | TemplatePathFn<PathDataModule>Enable/disable creating async chunks that are loaded on demand.
booleanAdd charset attribute for script tag.
booleanSpecifies 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.
string | TemplatePathFn<PathDataChunk>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).
"array-push" | "commonjs" | "module" | false | stringNumber of milliseconds before chunk request expires.
numberThe 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).
false | "jsonp" | "import-scripts" | "require" | "async-node" | "import" | stringThe global variable used by webpack for loading of chunks.
stringClean the output directory before emit.
boolean | CleanOptionsCheck if to be emitted file already exists and have the same content before writing to output filesystem.
booleanThis option enables cross-origin loading of chunks.
false | "anonymous" | "use-credentials"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.
string | TemplatePathFn<PathDataChunk>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.
string | TemplatePathFn<PathDataChunk>Similar to output.devtoolModuleFilenameTemplate, but used in the case of duplicate module identifiers.
string | ModuleFilenameTemplateFunctionFilename template string of function for the sources array in a generated SourceMap.
string | ModuleFilenameTemplateFunctionModule 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.
stringList of chunk loading types enabled for use by entry points.
("jsonp" | "import-scripts" | "require" | "async-node" | "import" | string)[]List of library types enabled for use by entry points.
("var" | "module" | "assign" | "assign-properties" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | string)[]List of wasm loading types enabled for use by entry points.
("fetch" | "async-node" | string)[]The abilities of the environment where the webpack generated code should run.
Environmentboolean...
').booleanawait ...
').booleanbooleanbooleana, b
= obj').booleanbooleanbooleanboolean...
').booleanbooleanimport.meta.dirname
and
import.meta.filename
.booleanmodule() {}
').booleanbooleannode:
prefix for Node.js core modules.booleanbooleanSpecifies 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.
string | TemplatePathFn<PathDataChunk>An expression which is used to address the global object/scope in runtime code.
stringDigest types used for the hash.
stringNumber of chars which are used for the hash.
numberAlgorithm used for generation the hash (see node.js crypto package).
string | typeof import('../lib/util/Hash')Any string which is added to the hash to salt it.
stringThe filename of the Hot Update Chunks. They are inside the output.path directory.
stringThe global variable used by webpack for loading of hot update chunks.
stringThe filename of the Hot Update Main File. It is inside the 'output.path' directory.
stringSpecifies 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.
string | TemplatePathFn<PathDataChunk>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.
string | TemplatePathFn<PathDataChunk>Ignore warnings in the browser.
booleanWrap javascript code into IIFE's to avoid leaking into global scope.
booleanThe name of the native import() function (can be exchanged for a polyfill).
stringThe name of the native import.meta object (can be exchanged for a polyfill).
stringMake the output files a library, exporting the exports of the entry point.
string[] | string | LibraryCustomUmdObject | LibraryOptions"var" | "module" | "assign" | "assign-properties" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | stringOutput javascript files as module source type.
booleanThe output directory as absolute path (required).
stringInclude comments with information about the modules.
"verbose" | booleanThe 'publicPath' specifies the public URL address of the output files when referenced in a browser.
"auto" | string | TemplatePathFnThis option enables loading async chunks via a custom script type, such as script type="module".
false | "text/javascript" | "module"The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.
stringPrefixes every line of the source in the bundle with this string.
stringHandles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.
booleanHandles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
booleanUse a Trusted Types policy to create urls for chunks. 'output.uniqueName' is used a default policy name. Passing a string sets a custom policy name.
true | string | TrustedTypes"continue" | "stop"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'.stringbooleanA unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
stringThe method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
false | "fetch" | "async-node" | stringThe filename of WebAssembly modules as relative path inside the 'output.path' directory.
stringThe 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).
false | "jsonp" | "import-scripts" | "require" | "async-node" | "import" | stringWorker 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.
stringThe method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
false | "fetch" | "async-node" | stringThe number of parallel processed modules in the compilation.
numberConfiguration for web performance recommendations.
false | PerformanceOptionsFilter function to select assets that are checked.
AssetFilterSets the format of the hints: warnings, errors or nothing at all.
false | "warning" | "error"File size limit (in bytes) when exceeded, that webpack will provide performance hints.
numberTotal size of an entry point (in bytes).
numberAdd additional plugins to the compiler.
(false | 0 | '' | null | undefined | WebpackPluginInstance | WebpackPluginFunction)[]Capture timing information for each module.
booleanStore compiler state to a json file.
false | stringLoad compiler state from a json file.
false | stringStore/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.
false | stringOptions for the resolver.
ResolveOptionsRedirect module requests.
Fields in the description file (usually package.json) which are used to redirect requests inside the module.
Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
objectEnable caching of successfully resolved requests (cache entries are revalidated).
booleanPredicate function to decide which requests should be cached.
((request: ResolveRequest) => boolean)Include the context information in the cache identifier when caching.
booleanCondition names for exports field entry point.
string[]Filenames used to find a description file (like a package.json).
string[]Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).
booleanField names from the description file (usually package.json) which are used to provide entry points of a package.
string[]An object which maps extension to extension aliases.
objectExtensions added to the request when trying to find the file.
string[]Redirect module requests when normal resolving fails.
Filesystem for the resolver.
InputFileSystemTreats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases).
booleanField names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).
string[]Field names from the description file (package.json) which are used to find the default entry point.
Filenames used to find the default entry point if there is no description file or main field.
string[]Folder names or directory paths where to find modules.
string[]Plugins for the resolver.
Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
booleanPrefer to resolve module requests as relative request and fallback to resolving as module.
booleanCustom resolver.
ResolverA list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.
A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
string[]Enable resolving symlinks to the original location.
booleanTypeScript config for paths mapping. Can be false (disabled), true (use default tsconfig.json), a string path to tsconfig.json, or an object with configFile and references options.
Enable caching of successfully resolved requests (cache entries are not revalidated).
Use synchronous filesystem calls for the resolver.
booleanOptions for the resolver when resolving loaders.
ResolveOptionsRedirect module requests.
Fields in the description file (usually package.json) which are used to redirect requests inside the module.
Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
objectEnable caching of successfully resolved requests (cache entries are revalidated).
booleanPredicate function to decide which requests should be cached.
((request: ResolveRequest) => boolean)Include the context information in the cache identifier when caching.
booleanCondition names for exports field entry point.
string[]Filenames used to find a description file (like a package.json).
string[]Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).
booleanField names from the description file (usually package.json) which are used to provide entry points of a package.
string[]An object which maps extension to extension aliases.
objectExtensions added to the request when trying to find the file.
string[]Redirect module requests when normal resolving fails.
Filesystem for the resolver.
InputFileSystemTreats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases).
booleanField names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).
string[]Field names from the description file (package.json) which are used to find the default entry point.
Filenames used to find the default entry point if there is no description file or main field.
string[]Folder names or directory paths where to find modules.
string[]Plugins for the resolver.
Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
booleanPrefer to resolve module requests as relative request and fallback to resolving as module.
booleanCustom resolver.
ResolverA list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.
A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
string[]Enable resolving symlinks to the original location.
booleanTypeScript config for paths mapping. Can be false (disabled), true (use default tsconfig.json), a string path to tsconfig.json, or an object with configFile and references options.
Enable caching of successfully resolved requests (cache entries are not revalidated).
Use synchronous filesystem calls for the resolver.
booleanOptions affecting how file system snapshots are created and validated.
SnapshotOptionsOptions for snapshotting build dependencies to determine if the whole cache need to be invalidated.
Options for snapshotting the context module to determine if it needs to be built again.
List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
Options for snapshotting dependencies of modules to determine if they need to be built again.
Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.
Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.
List of paths that are not managed by a package manager and the contents are subject to change.
Stats options object or preset name.
"none" | "summary" | "errors-only" | "errors-warnings" | "minimal" | "normal" | "detailed" | "verbose" | boolean | StatsOptionsFallback value for stats options when an option is not defined (has precedence over local webpack defaults).
booleanAdd assets information.
booleanSort the assets by that field.
false | stringSpace to display assets (groups will be collapsed to fit this space).
numberAdd built at time information.
booleanAdd information about cached (not built) modules (deprecated: use 'cachedModules' instead).
booleanShow cached assets (setting this to false only shows emitted files).
booleanAdd information about cached (not built) modules.
booleanAdd children information.
("none" | "summary" | "errors-only" | "errors-warnings" | "minimal" | "normal" | "detailed" | "verbose" | boolean | StatsOptions)[] | "none" | "summary" | "errors-only" | "errors-warnings" | "minimal" | "normal" | "detailed" | "verbose" | boolean | StatsOptionsbooleanbooleanfalse | stringnumberbooleanbooleanbooleanfalse
only shows emitted files).boolean("none" | "summary" | "errors-only" | "errors-warnings" | "minimal" | "normal" | "detailed" | "verbose" | boolean | StatsOptions)[] | "none" | "summary" | "errors-only" | "errors-warnings" | "minimal" | "normal" | "detailed" | "verbose" | boolean | StatsOptionsbooleanbooleannumberbooleanbooleannumberbooleanbooleanbooleanfalse | stringstringbooleanboolean"auto" | booleanboolean"auto" | boolean"auto" | boolean"auto" | booleanbooleanbooleanbooleannumberboolean | (RegExp | string | ModuleFilterItemTypeFn)[] | RegExp | string | ModuleFilterItemTypeFnboolean | (RegExp | string | ModuleFilterItemTypeFn)[] | RegExp | string | ModuleFilterItemTypeFnbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanboolean"none" | "error" | "warn" | "info" | "log" | "verbose" | booleanbooleanbooleanbooleanbooleanfalse | stringnumberbooleannumberbooleanbooleanbooleanbooleanbooleanbooleanbooleannumberbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleannumberDisplay auxiliary assets in chunk groups.
booleanDisplay children of chunk groups.
booleanLimit of assets displayed in chunk groups.
numberDisplay all chunk groups with the corresponding bundles.
booleanAdd built modules information to chunk information.
booleanSpace to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).
numberAdd the origins of chunks and chunk merging info.
booleanAdd information about parent, children and sibling chunks to chunk information.
booleanAdd chunk information.
booleanSort the chunks by that field.
false | stringEnables/Disables colorful output.
Context directory for request shortening.
stringShow chunk modules that are dependencies of other modules of the chunk.
booleanAdd module depth in module graph.
booleanDisplay the entry points with the corresponding bundles.
"auto" | booleanAdd --env information.
booleanAdd cause to errors.
"auto" | booleanAdd details to errors (like resolving log).
"auto" | booleanAdd nested errors to errors (like in AggregateError).
"auto" | booleanAdd internal stack trace to errors.
booleanAdd errors.
booleanAdd errors count.
booleanSpace to display errors (value is in number of lines).
numberPlease use excludeModules instead.
Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.
Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.
Group assets by how their are related to chunks.
booleanGroup assets by their status (emitted, compared for emit or cached).
booleanGroup assets by their extension.
booleanGroup assets by their asset info (immutable, development, hotModuleReplacement, etc).
booleanGroup assets by their path.
booleanGroup modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).
booleanGroup modules by their status (cached or built and cacheable).
booleanGroup modules by their extension.
booleanGroup modules by their layer.
booleanGroup modules by their path.
booleanGroup modules by their type.
booleanGroup reasons by their origin module.
booleanAdd the hash of the compilation.
booleanAdd ids.
booleanAdd logging output.
"none" | "error" | "warn" | "info" | "log" | "verbose" | booleanInclude debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
Add stack traces to logging output.
booleanAdd information about assets inside modules.
booleanAdd dependencies and origin of warnings/errors.
booleanAdd built modules information.
booleanSort the modules by that field.
false | stringSpace to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).
numberAdd information about modules nested in other modules (like with module concatenation).
booleanSpace to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).
numberShow reasons why optimization bailed out for modules.
booleanAdd information about orphan modules.
booleanAdd output path information.
booleanAdd performance hint flags.
booleanPreset for the default values.
Show exports provided by modules.
booleanAdd public path information.
booleanAdd information about the reasons why modules are included.
booleanSpace to display reasons (groups will be collapsed to fit this space).
numberAdd information about assets that are related to other assets (like SourceMaps for assets).
booleanAdd information about runtime modules (deprecated: use 'runtimeModules' instead).
booleanAdd information about runtime modules.
booleanAdd the source code of modules.
booleanAdd timing information.
booleanShow exports used by modules.
booleanAdd webpack version information.
booleanAdd warnings.
booleanAdd warnings count.
booleanSuppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.
Space to display warnings (value is in number of lines).
numberEnvironment to build for. An array of environments to build for all of them when possible.
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.
booleanEnter watch mode, which rebuilds on file change.
booleanOptions for the watcher.
WatchOptionsDelay the rebuilt after the first change. Value is a time in ms.
numberResolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').
booleanIgnore some files from watching (glob pattern or regexp).
Enable polling mode for watching.
Stop watching when stdin stream has ended.
boolean