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 | objectexport default {
amd: false,
};Report the first error as a hard error instead of tolerating it.
booleanexport default {
bail: true,
};Cache generated modules and chunks to improve performance for multiple incremental builds.
true | false | MemoryCacheOptions | FileCacheOptionsexport default {
cache: { type: "filesystem" },
};Additionally cache computation of modules that are unchanged and reference only unchanged modules. Only used when type is set to "memory".
booleanexport default {
cache: {
type: "memory",
cacheUnaffected: true,
},
};Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Only used when type is set to "memory".
numberexport default {
cache: {
type: "memory",
maxGenerations: 0,
},
};In memory caching.
"memory" | "filesystem"export default {
cache: {
type: "memory",
},
};Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost. Only used when type is set to "filesystem".
booleanexport default {
cache: {
type: "filesystem",
allowCollectingMemory: true,
},
};Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack'). Only used when type is set to "filesystem".
objectexport default {
cache: {
type: "filesystem",
buildDependencies: {},
},
};Base directory for the cache (defaults to node_modules/.cache/webpack). Only used when type is set to "filesystem".
stringexport default {
cache: {
type: "filesystem",
cacheDirectory: '...',
},
};Locations for the cache (defaults to cacheDirectory / name). Only used when type is set to "filesystem".
stringexport default {
cache: {
type: "filesystem",
cacheLocation: '...',
},
};Compression type used for the cache files. Only used when type is set to "filesystem".
false | "gzip" | "brotli"export default {
cache: {
type: "filesystem",
compression: "gzip",
},
};Algorithm used for generation the hash (see node.js crypto package). Only used when type is set to "filesystem".
stringexport default {
cache: {
type: "filesystem",
hashAlgorithm: '...',
},
};Time in ms after which idle period the cache storing should happen. Only used when type is set to "filesystem".
numberexport default {
cache: {
type: "filesystem",
idleTimeout: 0,
},
};Time in ms after which idle period the cache storing should happen when larger changes has been detected (cumulative build time > 2 x avg cache store time). Only used when type is set to "filesystem".
numberexport default {
cache: {
type: "filesystem",
idleTimeoutAfterLargeChanges: 0,
},
};Time in ms after which idle period the initial cache storing should happen. Only used when type is set to "filesystem".
numberexport default {
cache: {
type: "filesystem",
idleTimeoutForInitialStore: 0,
},
};List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable. Only used when type is set to "filesystem".
export default {
cache: {
type: "filesystem",
immutablePaths: [],
},
};List of paths that are managed by a package manager and can be trusted to not be modified otherwise. Only used when type is set to "filesystem".
export default {
cache: {
type: "filesystem",
managedPaths: [],
},
};Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds). Only used when type is set to "filesystem".
numberexport default {
cache: {
type: "filesystem",
maxAge: 0,
},
};Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache. Only used when type is set to "filesystem".
numberexport default {
cache: {
type: "filesystem",
maxMemoryGenerations: 0,
},
};Additionally cache computation of modules that are unchanged and reference only unchanged modules in memory. Only used when type is set to "filesystem".
booleanexport default {
cache: {
type: "filesystem",
memoryCacheUnaffected: true,
},
};Name for the cache. Different names will lead to different coexisting caches. Only used when type is set to "filesystem".
stringexport default {
cache: {
type: "filesystem",
name: '...',
},
};Track and log detailed timing information for individual cache items. Only used when type is set to "filesystem".
booleanexport default {
cache: {
type: "filesystem",
profile: true,
},
};Enable/disable readonly mode. Only used when type is set to "filesystem".
booleanexport default {
cache: {
type: "filesystem",
readonly: true,
},
};When to store data to the filesystem. (pack: Store data when compiler is idle in a single file). Only used when type is set to "filesystem".
"pack"export default {
cache: {
type: "filesystem",
store: "pack",
},
};Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache. Only used when type is set to "filesystem".
stringexport default {
cache: {
type: "filesystem",
version: '...',
},
};The base directory (absolute path!) for resolving the entry option. If output.pathinfo is set, the included pathinfo is shortened to this directory.
stringexport default {
context: '...',
};References to other configurations to depend on.
string[]export default {
dependencies: [],
};Options for the webpack-dev-server.
false | objectexport default {
devServer: false,
};A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
export default {
devtool: "eval",
};Enable and configure the Dotenv plugin to load environment variables from .env files.
boolean | DotenvPluginOptionsexport default {
dotenv: true,
};The directory from which .env files are loaded. Can be an absolute path, false will disable the .env file loading.
false | stringexport default {
dotenv: {
dir: '...',
},
};Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'.
export default {
dotenv: {
prefix: '...',
},
};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[]export default {
dotenv: {
template: [],
},
};The entry point(s) of the compilation.
RawEntryDynamic | EntryObject | string[] | stringexport default {
entry: '...',
};Enables/Disables experiments (experimental features with relax SemVer compatibility).
Experimentsexport default {
experiments: {},
};Support WebAssembly as asynchronous EcmaScript Module.
booleanexport default {
experiments: {
asyncWebAssembly: true,
},
};Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
booleanexport default {
experiments: {
backCompat: true,
},
};Build http(s): urls using a lockfile and resource content cache.
(RegExp | string | AllowedUriFn)[] | HttpUriOptionsexport default {
experiments: {
buildHttp: { allowedUris: [] },
},
};List of allowed URIs (resp. the beginning of them).
export default {
experiments: {
buildHttp: {
allowedUris: [],
},
},
};Location where resource content is stored for lockfile entries. It's also possible to disable storing by passing false.
false | stringexport default {
experiments: {
buildHttp: {
cacheLocation: '...',
},
},
};When set, anything that would lead to a modification of the lockfile or any resource content, will result in an error.
booleanexport default {
experiments: {
buildHttp: {
frozen: true,
},
},
};Location of the lockfile.
stringexport default {
experiments: {
buildHttp: {
lockfileLocation: '...',
},
},
};Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.
stringexport default {
experiments: {
buildHttp: {
proxy: '...',
},
},
};When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.
booleanexport default {
experiments: {
buildHttp: {
upgrade: true,
},
},
};Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.
booleanexport default {
experiments: {
cacheUnaffected: true,
},
};Enable css support.
booleanexport default {
experiments: {
css: true,
},
};Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.
booleanexport default {
experiments: {
deferImport: true,
},
};Apply defaults of next major version.
booleanexport default {
experiments: {
futureDefaults: true,
},
};Enable experimental HTML support. This flag does not by itself make .html files usable directly as entry points without additional HTML handling.
booleanexport default {
experiments: {
html: true,
},
};Compile entrypoints and import()s only when they are accessed.
boolean | LazyCompilationOptionsexport default {
experiments: {
lazyCompilation: true,
},
};Specifies the backend that should be used for handling client keep alive.
BackEnd | LazyCompilationDefaultBackendOptionsstringnumber | ListenOptions | Listen"http" | "https"HttpsServerOptions | HttpServerOptions | CreateServerFunctionexport default {
experiments: {
lazyCompilation: {
backend: {},
},
},
};Enable/disable lazy compilation for entries.
booleanexport default {
experiments: {
lazyCompilation: {
entries: true,
},
},
};Enable/disable lazy compilation for import() modules.
booleanexport default {
experiments: {
lazyCompilation: {
imports: true,
},
},
};Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.
export default {
experiments: {
lazyCompilation: {
test: '...',
},
},
};Allow output javascript files as module source type.
booleanexport default {
experiments: {
outputModule: true,
},
};Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
booleanexport default {
experiments: {
sourceImport: true,
},
};Support WebAssembly as synchronous EcmaScript Module (outdated).
booleanexport default {
experiments: {
syncWebAssembly: true,
},
};Enable typescript support.
booleanexport default {
experiments: {
typescript: true,
},
};Extend configuration from another configuration (only works when using webpack-cli).
export default {
extends: '...',
};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.
export default {
externals: '...',
};Specify externals depending on the layer.
object | ExternalItemByLayerFnexport default {
externals: {
byLayer: {},
},
};Enable presets of externals for specific targets.
ExternalsPresetsexport default {
externalsPresets: {},
};Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used.
booleanexport default {
externalsPresets: {
electron: true,
},
};Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.
booleanexport default {
externalsPresets: {
electronMain: true,
},
};Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
booleanexport default {
externalsPresets: {
electronPreload: true,
},
};Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
booleanexport default {
externalsPresets: {
electronRenderer: true,
},
};Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.
booleanexport default {
externalsPresets: {
node: true,
},
};Treat NW.js legacy nw.gui module as external and load it via require() when used.
booleanexport default {
externalsPresets: {
nwjs: true,
},
};Treat 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).
booleanexport default {
externalsPresets: {
web: true,
},
};Treat 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).
booleanexport default {
externalsPresets: {
webAsync: true,
},
};Specifies 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"export default {
externalsType: "var",
};Ignore specific warnings.
export default {
ignoreWarnings: [],
};Options for infrastructure level logging.
export default {
infrastructureLogging: {},
};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.
booleanexport default {
infrastructureLogging: {
appendOnly: true,
},
};Enables/Disables colorful output. This option is only used when no custom console is provided.
booleanexport default {
infrastructureLogging: {
colors: true,
},
};Custom console used for logging.
Consoleexport default {
infrastructureLogging: {
console: undefined,
},
};Enable debug logging for specific loggers.
export default {
infrastructureLogging: {
debug: '...',
},
};Log level.
"none" | "error" | "warn" | "info" | "log" | "verbose"export default {
infrastructureLogging: {
level: "none",
},
};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 }export default {
infrastructureLogging: {
stream: undefined,
},
};Custom values available in the loader context.
Loaderexport default {
loader: {},
};Enable production optimizations or development hints.
"development" | "production" | "none"export default {
mode: "development",
};Options affecting the normal modules (NormalModuleFactory).
ModuleOptionsexport default {
module: {},
};An array of rules applied by default for modules.
("..." | false | 0 | '' | null | undefined | RuleSetRule)[]export default {
module: {
defaultRules: [],
},
};Enable warnings for full dynamic dependencies.
booleanexport default {
module: {
exprContextCritical: true,
},
};Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.
booleanexport default {
module: {
exprContextRecursive: true,
},
};Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.
export default {
module: {
exprContextRegExp: true,
},
};Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.
stringexport default {
module: {
exprContextRequest: '...',
},
};Specify options for each generator.
export default {
module: {
generator: {},
},
};Generator options for asset modules.
booleanAssetGeneratorDataUrlOptions | DataUrlFunctionbooleanstring | TemplatePathFn<PathDataModule>string | TemplatePathFn<PathDataModule>string | TemplatePathFnexport default {
module: {
generator: {
asset: {},
},
},
};No generator options are supported for this module type.
export default {
module: {
generator: {
'asset/bytes': {},
},
},
};Generator options for asset/inline modules.
booleanAssetGeneratorDataUrlOptions | DataUrlFunctionexport default {
module: {
generator: {
'asset/inline': {},
},
},
};Generator options for asset/resource modules.
booleanbooleanstring | TemplatePathFn<PathDataModule>string | TemplatePathFn<PathDataModule>string | TemplatePathFnexport default {
module: {
generator: {
'asset/resource': {},
},
},
};No generator options are supported for this module type.
export default {
module: {
generator: {
'asset/source': {},
},
},
};Generator options for css modules.
CssGeneratorOptionsexport default {
module: {
generator: {
css: {},
},
},
};Generator options for css/module modules.
boolean"link" | "text" | "css-style-sheet" | "style""as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" | ExportsConventionFnbooleanstringnumberstring | typeof import('../lib/util/Hash')stringstring | TemplatePathFn<PathDataModule>export default {
module: {
generator: {
'css/auto': {},
},
},
};Generator options for css/module modules.
boolean"link" | "text" | "css-style-sheet" | "style""as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" | ExportsConventionFnbooleanstringnumberstring | typeof import('../lib/util/Hash')stringstring | TemplatePathFn<PathDataModule>export default {
module: {
generator: {
'css/global': {},
},
},
};Generator options for css/module modules.
boolean"link" | "text" | "css-style-sheet" | "style""as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" | ExportsConventionFnbooleanstringnumberstring | typeof import('../lib/util/Hash')stringstring | TemplatePathFn<PathDataModule>export default {
module: {
generator: {
'css/module': {},
},
},
};Generator options for html modules.
HtmlGeneratorOptionsboolean.html
output file alongside the module's JavaScript export. When unset, extraction defaults to
true
for HTML modules used as compilation entries (HTML entry points) and
false
for HTML modules imported from JavaScript. Filenames follow
output.htmlFilename
/
output.htmlChunkFilename
.export default {
module: {
generator: {
html: {},
},
},
};No generator options are supported for this module type.
export default {
module: {
generator: {
javascript: {},
},
},
};No generator options are supported for this module type.
export default {
module: {
generator: {
'javascript/auto': {},
},
},
};No generator options are supported for this module type.
export default {
module: {
generator: {
'javascript/dynamic': {},
},
},
};No generator options are supported for this module type.
export default {
module: {
generator: {
'javascript/esm': {},
},
},
};Generator options for json modules.
JsonGeneratorOptionsbooleanJSON.parse
when the JSON string is longer than 20 characters.export default {
module: {
generator: {
json: {},
},
},
};Don't parse files matching. It's matched against the full resolved request.
export default {
module: {
noParse: '...',
},
};Specify options for each parser.
export default {
module: {
parser: {},
},
};Parser options for asset modules.
AssetParserOptionsAssetParserDataUrlOptions | AssetParserDataUrlFunctionexport default {
module: {
parser: {
asset: {},
},
},
};No parser options are supported for this module type.
EmptyParserOptionsexport default {
module: {
parser: {
'asset/bytes': {},
},
},
};No parser options are supported for this module type.
EmptyParserOptionsexport default {
module: {
parser: {
'asset/inline': {},
},
},
};No parser options are supported for this module type.
EmptyParserOptionsexport default {
module: {
parser: {
'asset/resource': {},
},
},
};No parser options are supported for this module type.
EmptyParserOptionsexport default {
module: {
parser: {
'asset/source': {},
},
},
};Parser options for css modules.
CssParserOptions"link" | "text" | "css-style-sheet" | "style"boolean@import
at-rules handling.booleanbooleanurl()
/
image-set()
/
src()
/
image()
functions handling.export default {
module: {
parser: {
css: {},
},
},
};Parser options for css/auto and css/module modules.
boolean@keyframes
.boolean@container
names.booleanboolean"link" | "text" | "css-style-sheet" | "style"boolean@function
names.booleanboolean@import
at-rules handling.booleanbooleanbooleanurl()
/
image-set()
/
src()
/
image()
functions handling.export default {
module: {
parser: {
'css/auto': {},
},
},
};Parser options for css/global modules.
boolean@keyframes
.boolean@container
names.booleanboolean"link" | "text" | "css-style-sheet" | "style"boolean@function
names.booleanboolean@import
at-rules handling.booleanbooleanurl()
/
image-set()
/
src()
/
image()
functions handling.export default {
module: {
parser: {
'css/global': {},
},
},
};Parser options for css/auto and css/module modules.
boolean@keyframes
.boolean@container
names.booleanboolean"link" | "text" | "css-style-sheet" | "style"boolean@function
names.booleanboolean@import
at-rules handling.booleanbooleanbooleanurl()
/
image-set()
/
src()
/
image()
functions handling.export default {
module: {
parser: {
'css/module': {},
},
},
};Parser options for javascript modules.
false | objectrequire.amd
and
define.amd
. Or disable AMD support.booleanbooleanbooleanbooleancreateRequire
from "module"" and evaluating createRequire().boolean"low" | "high" | "auto" | false"eager" | "weak" | "lazy" | "lazy-once"boolean"error" | "warn" | "auto" | falsebooleanbooleanstringbooleanboolean"error" | "warn" | "auto" | falseboolean | "preserve-unknown"booleanfalse | NodeOptions"strict" | "non-strict"ParseFunction"error" | "warn" | "auto" | falsebooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanstring"relative" | booleanbooleanbooleanRegExpexport default {
module: {
parser: {
javascript: {},
},
},
};Parser options for javascript modules.
false | objectrequire.amd
and
define.amd
. Or disable AMD support.booleanbooleanbooleanbooleancreateRequire
from "module"" and evaluating createRequire().boolean"low" | "high" | "auto" | false"eager" | "weak" | "lazy" | "lazy-once"boolean"error" | "warn" | "auto" | falsebooleanbooleanstringbooleanboolean"error" | "warn" | "auto" | falseboolean | "preserve-unknown"booleanfalse | NodeOptions"strict" | "non-strict"ParseFunction"error" | "warn" | "auto" | falsebooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanstring"relative" | booleanbooleanbooleanRegExpexport default {
module: {
parser: {
'javascript/auto': {},
},
},
};Parser options for javascript modules.
false | objectrequire.amd
and
define.amd
. Or disable AMD support.booleanbooleanbooleanbooleancreateRequire
from "module"" and evaluating createRequire().boolean"low" | "high" | "auto" | false"eager" | "weak" | "lazy" | "lazy-once"boolean"error" | "warn" | "auto" | falsebooleanbooleanstringbooleanboolean"error" | "warn" | "auto" | falseboolean | "preserve-unknown"booleanfalse | NodeOptions"strict" | "non-strict"ParseFunction"error" | "warn" | "auto" | falsebooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanstring"relative" | booleanbooleanbooleanRegExpexport default {
module: {
parser: {
'javascript/dynamic': {},
},
},
};Parser options for javascript modules.
false | objectrequire.amd
and
define.amd
. Or disable AMD support.booleanbooleanbooleanbooleancreateRequire
from "module"" and evaluating createRequire().boolean"low" | "high" | "auto" | false"eager" | "weak" | "lazy" | "lazy-once"boolean"error" | "warn" | "auto" | falsebooleanbooleanstringbooleanboolean"error" | "warn" | "auto" | falseboolean | "preserve-unknown"booleanfalse | NodeOptions"strict" | "non-strict"ParseFunction"error" | "warn" | "auto" | falsebooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanstring"relative" | booleanbooleanbooleanRegExpexport default {
module: {
parser: {
'javascript/esm': {},
},
},
};Parser options for JSON modules.
JsonParserOptionsexport default {
module: {
parser: {
json: {},
},
},
};An array of rules applied for modules.
("..." | false | 0 | '' | null | undefined | RuleSetRule)[]export default {
module: {
rules: [],
},
};Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.
booleanexport default {
module: {
strictExportPresence: true,
},
};Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.
booleanexport default {
module: {
strictThisContextOnImports: true,
},
};Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.
booleanexport default {
module: {
unknownContextCritical: true,
},
};Enable 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'.
booleanexport default {
module: {
unknownContextRecursive: true,
},
};Sets 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'.
export default {
module: {
unknownContextRegExp: true,
},
};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'.
stringexport default {
module: {
unknownContextRequest: '...',
},
};Cache the resolving of module requests.
boolean | UnsafeCachePredicateexport default {
module: {
unsafeCache: true,
},
};Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.
booleanexport default {
module: {
wrappedContextCritical: true,
},
};Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.
booleanexport default {
module: {
wrappedContextRecursive: true,
},
};Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.
RegExpexport default {
module: {
wrappedContextRegExp: undefined,
},
};Name of the configuration. Used when loading multiple configurations.
stringexport default {
name: '...',
};Include polyfills or mocks for various node stuff.
false | NodeOptionsexport default {
node: false,
};Include a polyfill for the '__dirname' variable.
false | true | "warn-mock" | "mock" | "node-module" | "eval-only"export default {
node: {
__dirname: "warn-mock",
},
};Include a polyfill for the '__filename' variable.
false | true | "warn-mock" | "mock" | "node-module" | "eval-only"export default {
node: {
__filename: "warn-mock",
},
};Include a polyfill for the 'global' variable.
false | true | "warn"export default {
node: {
global: "warn",
},
};Enables/Disables integrated optimizations.
Optimizationexport default {
optimization: {},
};Avoid wrapping the entry module in an IIFE.
booleanexport default {
optimization: {
avoidEntryIife: true,
},
};Check for incompatible wasm types when importing/exporting from/to ESM.
booleanexport default {
optimization: {
checkWasmTypes: true,
},
};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).
"natural" | "named" | "deterministic" | "size" | "total-size" | falseexport default {
optimization: {
chunkIds: "natural",
},
};Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.
booleanexport default {
optimization: {
concatenateModules: true,
},
};Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.
booleanexport default {
optimization: {
emitOnErrors: true,
},
};Also flag chunks as loaded which contain a subset of the modules.
booleanexport default {
optimization: {
flagIncludedChunks: true,
},
};Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.
booleanexport default {
optimization: {
innerGraph: true,
},
};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).
"size" | "deterministic" | booleanexport default {
optimization: {
mangleExports: "size",
},
};Reduce size of WASM by changing imports to shorter strings.
booleanexport default {
optimization: {
mangleWasmImports: true,
},
};Merge chunks which contain the same modules.
booleanexport default {
optimization: {
mergeDuplicateChunks: true,
},
};Enable minimizing the output. Uses optimization.minimizer.
booleanexport default {
optimization: {
minimize: true,
},
};Minimizer(s) to use for minimizing the output.
("..." | false | 0 | '' | null | undefined | WebpackPluginInstance | WebpackPluginFunction)[]export default {
optimization: {
minimizer: [],
},
};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" | falseexport default {
optimization: {
moduleIds: "natural",
},
};Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).
booleanexport default {
optimization: {
noEmitOnErrors: true,
},
};Set process.env.NODE_ENV to a specific value.
false | stringexport default {
optimization: {
nodeEnv: '...',
},
};Generate records with relative paths to be able to move the context folder.
booleanexport default {
optimization: {
portableRecords: true,
},
};Figure out which exports are provided by modules to generate more efficient code.
booleanexport default {
optimization: {
providedExports: true,
},
};Use real [contenthash] based on final content of the assets.
booleanexport default {
optimization: {
realContentHash: true,
},
};Removes modules from chunks when these modules are already included in all parents.
booleanexport default {
optimization: {
removeAvailableModules: true,
},
};Remove chunks which are empty.
booleanexport default {
optimization: {
removeEmptyChunks: true,
},
};Create an additional chunk which contains only the webpack runtime and chunk hash maps.
export default {
optimization: {
runtimeChunk: "single",
},
};The name or name factory for the runtime chunks.
string | RuntimeChunkFunctionexport default {
optimization: {
runtimeChunk: {
name: '...',
},
},
};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" | booleanexport default {
optimization: {
sideEffects: "flag",
},
};Optimize duplication and caching by splitting chunks by shared modules and cache group.
false | OptimizationSplitChunksOptionsexport default {
optimization: {
splitChunks: false,
},
};Sets the name delimiter for created chunks.
stringexport default {
optimization: {
splitChunks: {
automaticNameDelimiter: '...',
},
},
};Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors').
objectexport default {
optimization: {
splitChunks: {
cacheGroups: {},
},
},
};Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
"initial" | "async" | "all" | RegExp | ChunkFilterFnexport default {
optimization: {
splitChunks: {
chunks: "initial",
},
},
};Sets the size types which are used when a number is used for sizes.
SourceType[]export default {
optimization: {
splitChunks: {
defaultSizeTypes: [],
},
},
};Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
export default {
optimization: {
splitChunks: {
enforceSizeThreshold: 0,
},
},
};Options for modules not selected by any other cache group.
export default {
optimization: {
splitChunks: {
fallbackCacheGroup: {},
},
},
};Sets the template for the filename for created chunks.
string | TemplatePathFn<PathDataChunk>export default {
optimization: {
splitChunks: {
filename: '...',
},
},
};Prevents exposing path info when creating names for parts splitted by maxSize.
booleanexport default {
optimization: {
splitChunks: {
hidePathInfo: true,
},
},
};Maximum number of requests which are accepted for on-demand loading.
numberexport default {
optimization: {
splitChunks: {
maxAsyncRequests: 0,
},
},
};Maximal size hint for the on-demand chunks.
export default {
optimization: {
splitChunks: {
maxAsyncSize: 0,
},
},
};Maximum number of initial chunks which are accepted for an entry point.
numberexport default {
optimization: {
splitChunks: {
maxInitialRequests: 0,
},
},
};Maximal size hint for the initial chunks.
export default {
optimization: {
splitChunks: {
maxInitialSize: 0,
},
},
};Maximal size hint for the created chunks.
export default {
optimization: {
splitChunks: {
maxSize: 0,
},
},
};Minimum number of times a module has to be duplicated until it's considered for splitting.
numberexport default {
optimization: {
splitChunks: {
minChunks: 0,
},
},
};Minimal size for the chunks the stay after moving the modules to a new chunk.
export default {
optimization: {
splitChunks: {
minRemainingSize: 0,
},
},
};Minimal size for the created chunks.
export default {
optimization: {
splitChunks: {
minSize: 0,
},
},
};Minimum size reduction due to the created chunk.
export default {
optimization: {
splitChunks: {
minSizeReduction: 0,
},
},
};Give chunks created a name (chunks with equal name are merged).
false | string | GetNameFnexport default {
optimization: {
splitChunks: {
name: '...',
},
},
};Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
booleanexport default {
optimization: {
splitChunks: {
usedExports: true,
},
},
};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).
"global" | booleanexport default {
optimization: {
usedExports: "global",
},
};Options affecting the output of the compilation. output options tell webpack how to write the compiled files to disk.
Outputexport default {
output: {},
};stringexport default {
output: {
amdContainer: '...',
},
};The filename of asset modules as relative path inside the 'output.path' directory.
string | TemplatePathFn<PathDataModule>export default {
output: {
assetModuleFilename: '...',
},
};Enable/disable creating async chunks that are loaded on demand.
booleanexport default {
output: {
asyncChunks: true,
},
};export default {
output: {
auxiliaryComment: '...',
},
};Set comment for amd section in UMD.
stringexport default {
output: {
auxiliaryComment: {
amd: '...',
},
},
};Set comment for commonjs (exports) section in UMD.
stringexport default {
output: {
auxiliaryComment: {
commonjs: '...',
},
},
};Set comment for commonjs2 (module.exports) section in UMD.
stringexport default {
output: {
auxiliaryComment: {
commonjs2: '...',
},
},
};Set comment for root (global variable) section in UMD.
stringexport default {
output: {
auxiliaryComment: {
root: '...',
},
},
};Add charset attribute for script tag.
booleanexport default {
output: {
charset: true,
},
};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.
string | TemplatePathFn<PathDataChunk>export default {
output: {
chunkFilename: '...',
},
};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 | stringexport default {
output: {
chunkFormat: "array-push",
},
};Number of milliseconds before chunk request expires.
numberexport default {
output: {
chunkLoadTimeout: 0,
},
};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).
false | "jsonp" | "import-scripts" | "require" | "async-node" | "import" | stringexport default {
output: {
chunkLoading: "jsonp",
},
};The global variable used by webpack for loading of chunks.
stringexport default {
output: {
chunkLoadingGlobal: '...',
},
};Clean the output directory before emit.
boolean | CleanOptionsexport default {
output: {
clean: true,
},
};Log the assets that should be removed instead of deleting them.
booleanexport default {
output: {
clean: {
dry: true,
},
},
};Keep these assets.
export default {
output: {
clean: {
keep: '...',
},
},
};Check if to be emitted file already exists and have the same content before writing to output filesystem.
booleanexport default {
output: {
compareBeforeEmit: true,
},
};This option enables cross-origin loading of chunks.
false | "anonymous" | "use-credentials"export default {
output: {
crossOriginLoading: "anonymous",
},
};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>export default {
output: {
cssChunkFilename: '...',
},
};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>export default {
output: {
cssFilename: '...',
},
};Similar to output.devtoolModuleFilenameTemplate, but used in the case of duplicate module identifiers.
string | ModuleFilenameTemplateFunctionexport default {
output: {
devtoolFallbackModuleFilenameTemplate: '...',
},
};Filename template string of function for the sources array in a generated SourceMap.
string | ModuleFilenameTemplateFunctionexport default {
output: {
devtoolModuleFilenameTemplate: '...',
},
};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.
stringexport default {
output: {
devtoolNamespace: '...',
},
};List of chunk loading types enabled for use by entry points.
("jsonp" | "import-scripts" | "require" | "async-node" | "import" | string)[]export default {
output: {
enabledChunkLoadingTypes: [],
},
};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)[]export default {
output: {
enabledLibraryTypes: [],
},
};List of wasm loading types enabled for use by entry points.
("fetch" | "async-node" | string)[]export default {
output: {
enabledWasmLoadingTypes: [],
},
};The abilities of the environment where the webpack generated code should run.
Environmentexport default {
output: {
environment: {},
},
};The environment supports arrow functions ('() => ...').
booleanexport default {
output: {
environment: {
arrowFunction: true,
},
},
};The environment supports async function and await ('async function () await ...').
booleanexport default {
output: {
environment: {
asyncFunction: true,
},
},
};The environment supports BigInt as literal (123n).
booleanexport default {
output: {
environment: {
bigIntLiteral: true,
},
},
};The environment supports const and let for variable declarations.
booleanexport default {
output: {
environment: {
const: true,
},
},
};The environment supports destructuring ('a, b = obj').
booleanexport default {
output: {
environment: {
destructuring: true,
},
},
};The environment supports 'document'.
booleanexport default {
output: {
environment: {
document: true,
},
},
};The environment supports an async import() function to import EcmaScript modules.
booleanexport default {
output: {
environment: {
dynamicImport: true,
},
},
};The environment supports an async import() is available when creating a worker.
booleanexport default {
output: {
environment: {
dynamicImportInWorker: true,
},
},
};The environment supports 'for of' iteration ('for (const x of array) ...').
booleanexport default {
output: {
environment: {
forOf: true,
},
},
};The environment supports 'globalThis'.
booleanexport default {
output: {
environment: {
globalThis: true,
},
},
};The environment supports import.meta.dirname and import.meta.filename.
booleanexport default {
output: {
environment: {
importMetaDirnameAndFilename: true,
},
},
};The environment supports object method shorthand ('module() {}').
booleanexport default {
output: {
environment: {
methodShorthand: true,
},
},
};The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
booleanexport default {
output: {
environment: {
module: true,
},
},
};The environment supports node: prefix for Node.js core modules.
booleanexport default {
output: {
environment: {
nodePrefixForCoreModules: true,
},
},
};The environment supports optional chaining ('obj?.a' or 'obj?.()').
booleanexport default {
output: {
environment: {
optionalChaining: true,
},
},
};The environment supports template literals.
booleanexport default {
output: {
environment: {
templateLiteral: true,
},
},
};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.
string | TemplatePathFn<PathDataChunk>export default {
output: {
filename: '...',
},
};An expression which is used to address the global object/scope in runtime code.
stringexport default {
output: {
globalObject: '...',
},
};Digest types used for the hash.
stringexport default {
output: {
hashDigest: '...',
},
};Number of chars which are used for the hash.
numberexport default {
output: {
hashDigestLength: 0,
},
};Algorithm used for generation the hash (see node.js crypto package).
string | typeof import('../lib/util/Hash')export default {
output: {
hashFunction: '...',
},
};Any string which is added to the hash to salt it.
stringexport default {
output: {
hashSalt: '...',
},
};The filename of the Hot Update Chunks. They are inside the output.path directory.
stringexport default {
output: {
hotUpdateChunkFilename: '...',
},
};The global variable used by webpack for loading of hot update chunks.
stringexport default {
output: {
hotUpdateGlobal: '...',
},
};The filename of the Hot Update Main File. It is inside the 'output.path' directory.
stringexport default {
output: {
hotUpdateMainFilename: '...',
},
};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.
string | TemplatePathFn<PathDataChunk>export default {
output: {
htmlChunkFilename: '...',
},
};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>export default {
output: {
htmlFilename: '...',
},
};Ignore warnings in the browser.
booleanexport default {
output: {
ignoreBrowserWarnings: true,
},
};Wrap javascript code into IIFE's to avoid leaking into global scope.
booleanexport default {
output: {
iife: true,
},
};The name of the native import() function (can be exchanged for a polyfill).
stringexport default {
output: {
importFunctionName: '...',
},
};The name of the native import.meta object (can be exchanged for a polyfill).
stringexport default {
output: {
importMetaName: '...',
},
};Make the output files a library, exporting the exports of the entry point.
string[] | string | LibraryCustomUmdObject | LibraryOptionsexport default {
output: {
library: { type: "var" },
},
};Name of the exposed AMD library in the UMD.
stringexport default {
output: {
library: {
amd: '...',
},
},
};Name of the exposed commonjs export in the UMD.
stringexport default {
output: {
library: {
commonjs: '...',
},
},
};Name of the property exposed globally by a UMD library.
export default {
output: {
library: {
root: '...',
},
},
};Add a container for define/require functions in the AMD module.
stringexport default {
output: {
library: {
amdContainer: '...',
},
},
};Add a comment in the UMD wrapper.
export default {
output: {
library: {
auxiliaryComment: '...',
},
},
};Specify which export should be exposed as library.
export default {
output: {
library: {
export: '...',
},
},
};The name of the library (some types allow unnamed libraries too).
export default {
output: {
library: {
name: '...',
},
},
};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).
"var" | "module" | "assign" | "assign-properties" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | stringexport default {
output: {
library: {
type: "var",
},
},
};If output.libraryTarget is set to umd and output.library is set, setting this to true will name the AMD module.
booleanexport default {
output: {
library: {
umdNamedDefine: true,
},
},
};export default {
output: {
libraryExport: '...',
},
};"var" | "module" | "assign" | "assign-properties" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | stringexport default {
output: {
libraryTarget: "var",
},
};Output javascript files as module source type.
booleanexport default {
output: {
module: true,
},
};The output directory as absolute path (required).
stringexport default {
output: {
path: '...',
},
};Include comments with information about the modules.
"verbose" | booleanexport default {
output: {
pathinfo: "verbose",
},
};The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
"auto" | string | TemplatePathFnexport default {
output: {
publicPath: "auto",
},
};This option enables loading async chunks via a custom script type, such as script type="module".
false | "text/javascript" | "module"export default {
output: {
scriptType: "text/javascript",
},
};The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.
stringexport default {
output: {
sourceMapFilename: '...',
},
};Prefixes every line of the source in the bundle with this string.
stringexport default {
output: {
sourcePrefix: '...',
},
};Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.
booleanexport default {
output: {
strictModuleErrorHandling: true,
},
};Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
booleanexport default {
output: {
strictModuleExceptionHandling: true,
},
};Use 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 | TrustedTypesexport default {
output: {
trustedTypes: '...',
},
};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'.
"continue" | "stop"export default {
output: {
trustedTypes: {
onPolicyCreationFailure: "continue",
},
},
};The name of the Trusted Types policy created by webpack to serve bundle chunks.
stringexport default {
output: {
trustedTypes: {
policyName: '...',
},
},
};booleanexport default {
output: {
umdNamedDefine: true,
},
};A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
stringexport default {
output: {
uniqueName: '...',
},
};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).
false | "fetch" | "async-node" | stringexport default {
output: {
wasmLoading: "fetch",
},
};The filename of WebAssembly modules as relative path inside the 'output.path' directory.
stringexport default {
output: {
webassemblyModuleFilename: '...',
},
};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).
false | "jsonp" | "import-scripts" | "require" | "async-node" | "import" | stringexport default {
output: {
workerChunkLoading: "jsonp",
},
};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.
stringexport default {
output: {
workerPublicPath: '...',
},
};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).
false | "fetch" | "async-node" | stringexport default {
output: {
workerWasmLoading: "fetch",
},
};The number of parallel processed modules in the compilation.
numberexport default {
parallelism: 0,
};Configuration for web performance recommendations.
false | PerformanceOptionsexport default {
performance: false,
};Filter function to select assets that are checked.
AssetFilterexport default {
performance: {
assetFilter: () => {},
},
};Sets the format of the hints: warnings, errors or nothing at all.
false | "warning" | "error"export default {
performance: {
hints: "warning",
},
};File size limit (in bytes) when exceeded, that webpack will provide performance hints.
numberexport default {
performance: {
maxAssetSize: 0,
},
};Total size of an entry point (in bytes).
numberexport default {
performance: {
maxEntrypointSize: 0,
},
};Add additional plugins to the compiler.
(false | 0 | '' | null | undefined | WebpackPluginInstance | WebpackPluginFunction)[]export default {
plugins: [],
};Capture timing information for each module.
booleanexport default {
profile: true,
};Store compiler state to a json file.
false | stringexport default {
recordsInputPath: '...',
};Load compiler state from a json file.
false | stringexport default {
recordsOutputPath: '...',
};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.
false | stringexport default {
recordsPath: '...',
};Options for the resolver.
ResolveOptionsexport default {
resolve: {},
};Redirect module requests.
export default {
resolve: {
alias: [],
},
};Fields in the description file (usually package.json) which are used to redirect requests inside the module.
export default {
resolve: {
aliasFields: [],
},
};Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
objectexport default {
resolve: {
byDependency: {},
},
};Enable caching of successfully resolved requests (cache entries are revalidated).
booleanexport default {
resolve: {
cache: true,
},
};Predicate function to decide which requests should be cached.
((request: ResolveRequest) => boolean)export default {
resolve: {
cachePredicate: () => {},
},
};Include the context information in the cache identifier when caching.
booleanexport default {
resolve: {
cacheWithContext: true,
},
};Condition names for exports field entry point.
string[]export default {
resolve: {
conditionNames: [],
},
};Filenames used to find a description file (like a package.json).
string[]export default {
resolve: {
descriptionFiles: [],
},
};Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).
booleanexport default {
resolve: {
enforceExtension: true,
},
};Field names from the description file (usually package.json) which are used to provide entry points of a package.
string[]export default {
resolve: {
exportsFields: [],
},
};An object which maps extension to extension aliases.
objectexport default {
resolve: {
extensionAlias: {},
},
};Extensions added to the request when trying to find the file.
string[]export default {
resolve: {
extensions: [],
},
};Redirect module requests when normal resolving fails.
export default {
resolve: {
fallback: [],
},
};Filesystem for the resolver.
InputFileSystemexport default {
resolve: {
fileSystem: undefined,
},
};Treats 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).
booleanexport default {
resolve: {
fullySpecified: true,
},
};Field 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[]export default {
resolve: {
importsFields: [],
},
};Field names from the description file (package.json) which are used to find the default entry point.
export default {
resolve: {
mainFields: [],
},
};Filenames used to find the default entry point if there is no description file or main field.
string[]export default {
resolve: {
mainFiles: [],
},
};Folder names or directory paths where to find modules.
string[]export default {
resolve: {
modules: [],
},
};Plugins for the resolver.
export default {
resolve: {
plugins: [],
},
};Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
booleanexport default {
resolve: {
preferAbsolute: true,
},
};Prefer to resolve module requests as relative request and fallback to resolving as module.
booleanexport default {
resolve: {
preferRelative: true,
},
};Custom resolver.
Resolverexport default {
resolve: {
resolver: undefined,
},
};A 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.
export default {
resolve: {
restrictions: [],
},
};A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
string[]export default {
resolve: {
roots: [],
},
};Enable resolving symlinks to the original location.
booleanexport default {
resolve: {
symlinks: true,
},
};TypeScript 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.
export default {
resolve: {
tsconfig: '...',
},
};A path to the tsconfig file.
stringexport default {
resolve: {
tsconfig: {
configFile: '...',
},
},
};References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths.
"auto" | stringexport default {
resolve: {
tsconfig: {
references: "auto",
},
},
};Enable caching of successfully resolved requests (cache entries are not revalidated).
export default {
resolve: {
unsafeCache: true,
},
};Use synchronous filesystem calls for the resolver.
booleanexport default {
resolve: {
useSyncFileSystemCalls: true,
},
};Options for the resolver when resolving loaders.
ResolveOptionsexport default {
resolveLoader: {},
};Redirect module requests.
export default {
resolveLoader: {
alias: [],
},
};Fields in the description file (usually package.json) which are used to redirect requests inside the module.
export default {
resolveLoader: {
aliasFields: [],
},
};Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
objectexport default {
resolveLoader: {
byDependency: {},
},
};Enable caching of successfully resolved requests (cache entries are revalidated).
booleanexport default {
resolveLoader: {
cache: true,
},
};Predicate function to decide which requests should be cached.
((request: ResolveRequest) => boolean)export default {
resolveLoader: {
cachePredicate: () => {},
},
};Include the context information in the cache identifier when caching.
booleanexport default {
resolveLoader: {
cacheWithContext: true,
},
};Condition names for exports field entry point.
string[]export default {
resolveLoader: {
conditionNames: [],
},
};Filenames used to find a description file (like a package.json).
string[]export default {
resolveLoader: {
descriptionFiles: [],
},
};Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).
booleanexport default {
resolveLoader: {
enforceExtension: true,
},
};Field names from the description file (usually package.json) which are used to provide entry points of a package.
string[]export default {
resolveLoader: {
exportsFields: [],
},
};An object which maps extension to extension aliases.
objectexport default {
resolveLoader: {
extensionAlias: {},
},
};Extensions added to the request when trying to find the file.
string[]export default {
resolveLoader: {
extensions: [],
},
};Redirect module requests when normal resolving fails.
export default {
resolveLoader: {
fallback: [],
},
};Filesystem for the resolver.
InputFileSystemexport default {
resolveLoader: {
fileSystem: undefined,
},
};Treats 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).
booleanexport default {
resolveLoader: {
fullySpecified: true,
},
};Field 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[]export default {
resolveLoader: {
importsFields: [],
},
};Field names from the description file (package.json) which are used to find the default entry point.
export default {
resolveLoader: {
mainFields: [],
},
};Filenames used to find the default entry point if there is no description file or main field.
string[]export default {
resolveLoader: {
mainFiles: [],
},
};Folder names or directory paths where to find modules.
string[]export default {
resolveLoader: {
modules: [],
},
};Plugins for the resolver.
export default {
resolveLoader: {
plugins: [],
},
};Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
booleanexport default {
resolveLoader: {
preferAbsolute: true,
},
};Prefer to resolve module requests as relative request and fallback to resolving as module.
booleanexport default {
resolveLoader: {
preferRelative: true,
},
};Custom resolver.
Resolverexport default {
resolveLoader: {
resolver: undefined,
},
};A 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.
export default {
resolveLoader: {
restrictions: [],
},
};A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
string[]export default {
resolveLoader: {
roots: [],
},
};Enable resolving symlinks to the original location.
booleanexport default {
resolveLoader: {
symlinks: true,
},
};TypeScript 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.
export default {
resolveLoader: {
tsconfig: '...',
},
};A path to the tsconfig file.
stringexport default {
resolveLoader: {
tsconfig: {
configFile: '...',
},
},
};References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths.
"auto" | stringexport default {
resolveLoader: {
tsconfig: {
references: "auto",
},
},
};Enable caching of successfully resolved requests (cache entries are not revalidated).
export default {
resolveLoader: {
unsafeCache: true,
},
};Use synchronous filesystem calls for the resolver.
booleanexport default {
resolveLoader: {
useSyncFileSystemCalls: true,
},
};Options affecting how file system snapshots are created and validated.
SnapshotOptionsexport default {
snapshot: {},
};Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.
objectexport default {
snapshot: {
buildDependencies: {},
},
};Use hashes of the content of the files/directories to determine invalidation.
booleanexport default {
snapshot: {
buildDependencies: {
hash: true,
},
},
};Use timestamps of the files/directories to determine invalidation.
booleanexport default {
snapshot: {
buildDependencies: {
timestamp: true,
},
},
};Options for snapshotting the context module to determine if it needs to be built again.
objectexport default {
snapshot: {
contextModule: {},
},
};Use hashes of the content of the files/directories to determine invalidation.
booleanexport default {
snapshot: {
contextModule: {
hash: true,
},
},
};Use timestamps of the files/directories to determine invalidation.
booleanexport default {
snapshot: {
contextModule: {
timestamp: true,
},
},
};List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
export default {
snapshot: {
immutablePaths: [],
},
};List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
export default {
snapshot: {
managedPaths: [],
},
};Options for snapshotting dependencies of modules to determine if they need to be built again.
objectexport default {
snapshot: {
module: {},
},
};Use hashes of the content of the files/directories to determine invalidation.
booleanexport default {
snapshot: {
module: {
hash: true,
},
},
};Use timestamps of the files/directories to determine invalidation.
booleanexport default {
snapshot: {
module: {
timestamp: true,
},
},
};Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.
objectexport default {
snapshot: {
resolve: {},
},
};Use hashes of the content of the files/directories to determine invalidation.
booleanexport default {
snapshot: {
resolve: {
hash: true,
},
},
};Use timestamps of the files/directories to determine invalidation.
booleanexport default {
snapshot: {
resolve: {
timestamp: true,
},
},
};Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.
objectexport default {
snapshot: {
resolveBuildDependencies: {},
},
};Use hashes of the content of the files/directories to determine invalidation.
booleanexport default {
snapshot: {
resolveBuildDependencies: {
hash: true,
},
},
};Use timestamps of the files/directories to determine invalidation.
booleanexport default {
snapshot: {
resolveBuildDependencies: {
timestamp: true,
},
},
};List of paths that are not managed by a package manager and the contents are subject to change.
export default {
snapshot: {
unmanagedPaths: [],
},
};Stats options object or preset name.
"none" | "summary" | "errors-only" | "errors-warnings" | "minimal" | "normal" | "detailed" | "verbose" | boolean | StatsOptionsexport default {
stats: "none",
};Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).
booleanexport default {
stats: {
all: true,
},
};Add assets information.
booleanexport default {
stats: {
assets: true,
},
};Sort the assets by that field.
false | stringexport default {
stats: {
assetsSort: '...',
},
};Space to display assets (groups will be collapsed to fit this space).
numberexport default {
stats: {
assetsSpace: 0,
},
};Add built at time information.
booleanexport default {
stats: {
builtAt: true,
},
};Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).
booleanexport default {
stats: {
cached: true,
},
};Show cached assets (setting this to false only shows emitted files).
booleanexport default {
stats: {
cachedAssets: true,
},
};Add information about cached (not built) modules.
booleanexport default {
stats: {
cachedModules: true,
},
};Add 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 | StatsOptionsexport default {
stats: {
children: "none",
},
};Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).
booleanexport default {
stats: {
children: {
all: true,
},
},
};Add assets information.
booleanexport default {
stats: {
children: {
assets: true,
},
},
};Sort the assets by that field.
false | stringexport default {
stats: {
children: {
assetsSort: '...',
},
},
};Space to display assets (groups will be collapsed to fit this space).
numberexport default {
stats: {
children: {
assetsSpace: 0,
},
},
};Add built at time information.
booleanexport default {
stats: {
children: {
builtAt: true,
},
},
};Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).
booleanexport default {
stats: {
children: {
cached: true,
},
},
};Show cached assets (setting this to false only shows emitted files).
booleanexport default {
stats: {
children: {
cachedAssets: true,
},
},
};Add information about cached (not built) modules.
booleanexport default {
stats: {
children: {
cachedModules: true,
},
},
};Add 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 | stringnumberbooleannumberbooleanbooleanbooleanbooleanbooleanbooleanbooleannumberbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleannumberexport default {
stats: {
children: {
children: "none",
},
},
};Display auxiliary assets in chunk groups.
booleanexport default {
stats: {
children: {
chunkGroupAuxiliary: true,
},
},
};Display children of chunk groups.
booleanexport default {
stats: {
children: {
chunkGroupChildren: true,
},
},
};Limit of assets displayed in chunk groups.
numberexport default {
stats: {
children: {
chunkGroupMaxAssets: 0,
},
},
};Display all chunk groups with the corresponding bundles.
booleanexport default {
stats: {
children: {
chunkGroups: true,
},
},
};Add built modules information to chunk information.
booleanexport default {
stats: {
children: {
chunkModules: true,
},
},
};Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).
numberexport default {
stats: {
children: {
chunkModulesSpace: 0,
},
},
};Add the origins of chunks and chunk merging info.
booleanexport default {
stats: {
children: {
chunkOrigins: true,
},
},
};Add information about parent, children and sibling chunks to chunk information.
booleanexport default {
stats: {
children: {
chunkRelations: true,
},
},
};Add chunk information.
booleanexport default {
stats: {
children: {
chunks: true,
},
},
};Sort the chunks by that field.
false | stringexport default {
stats: {
children: {
chunksSort: '...',
},
},
};Enables/Disables colorful output.
export default {
stats: {
children: {
colors: true,
},
},
};Context directory for request shortening.
stringexport default {
stats: {
children: {
context: '...',
},
},
};Show chunk modules that are dependencies of other modules of the chunk.
booleanexport default {
stats: {
children: {
dependentModules: true,
},
},
};Add module depth in module graph.
booleanexport default {
stats: {
children: {
depth: true,
},
},
};Display the entry points with the corresponding bundles.
"auto" | booleanexport default {
stats: {
children: {
entrypoints: "auto",
},
},
};Add --env information.
booleanexport default {
stats: {
children: {
env: true,
},
},
};Add cause to errors.
"auto" | booleanexport default {
stats: {
children: {
errorCause: "auto",
},
},
};Add details to errors (like resolving log).
"auto" | booleanexport default {
stats: {
children: {
errorDetails: "auto",
},
},
};Add nested errors to errors (like in AggregateError).
"auto" | booleanexport default {
stats: {
children: {
errorErrors: "auto",
},
},
};Add internal stack trace to errors.
booleanexport default {
stats: {
children: {
errorStack: true,
},
},
};Add errors.
booleanexport default {
stats: {
children: {
errors: true,
},
},
};Add errors count.
booleanexport default {
stats: {
children: {
errorsCount: true,
},
},
};Space to display errors (value is in number of lines).
numberexport default {
stats: {
children: {
errorsSpace: 0,
},
},
};Please use excludeModules instead.
export default {
stats: {
children: {
exclude: '...',
},
},
};Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.
export default {
stats: {
children: {
excludeAssets: '...',
},
},
};Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.
export default {
stats: {
children: {
excludeModules: '...',
},
},
};Group assets by how their are related to chunks.
booleanexport default {
stats: {
children: {
groupAssetsByChunk: true,
},
},
};Group assets by their status (emitted, compared for emit or cached).
booleanexport default {
stats: {
children: {
groupAssetsByEmitStatus: true,
},
},
};Group assets by their extension.
booleanexport default {
stats: {
children: {
groupAssetsByExtension: true,
},
},
};Group assets by their asset info (immutable, development, hotModuleReplacement, etc).
booleanexport default {
stats: {
children: {
groupAssetsByInfo: true,
},
},
};Group assets by their path.
booleanexport default {
stats: {
children: {
groupAssetsByPath: true,
},
},
};Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).
booleanexport default {
stats: {
children: {
groupModulesByAttributes: true,
},
},
};Group modules by their status (cached or built and cacheable).
booleanexport default {
stats: {
children: {
groupModulesByCacheStatus: true,
},
},
};Group modules by their extension.
booleanexport default {
stats: {
children: {
groupModulesByExtension: true,
},
},
};Group modules by their layer.
booleanexport default {
stats: {
children: {
groupModulesByLayer: true,
},
},
};Group modules by their path.
booleanexport default {
stats: {
children: {
groupModulesByPath: true,
},
},
};Group modules by their type.
booleanexport default {
stats: {
children: {
groupModulesByType: true,
},
},
};Group reasons by their origin module.
booleanexport default {
stats: {
children: {
groupReasonsByOrigin: true,
},
},
};Add the hash of the compilation.
booleanexport default {
stats: {
children: {
hash: true,
},
},
};Add ids.
booleanexport default {
stats: {
children: {
ids: true,
},
},
};Add logging output.
"none" | "error" | "warn" | "info" | "log" | "verbose" | booleanexport default {
stats: {
children: {
logging: "none",
},
},
};Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
export default {
stats: {
children: {
loggingDebug: '...',
},
},
};Add stack traces to logging output.
booleanexport default {
stats: {
children: {
loggingTrace: true,
},
},
};Add information about assets inside modules.
booleanexport default {
stats: {
children: {
moduleAssets: true,
},
},
};Add dependencies and origin of warnings/errors.
booleanexport default {
stats: {
children: {
moduleTrace: true,
},
},
};Add built modules information.
booleanexport default {
stats: {
children: {
modules: true,
},
},
};Sort the modules by that field.
false | stringexport default {
stats: {
children: {
modulesSort: '...',
},
},
};Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).
numberexport default {
stats: {
children: {
modulesSpace: 0,
},
},
};Add information about modules nested in other modules (like with module concatenation).
booleanexport default {
stats: {
children: {
nestedModules: true,
},
},
};Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).
numberexport default {
stats: {
children: {
nestedModulesSpace: 0,
},
},
};Show reasons why optimization bailed out for modules.
booleanexport default {
stats: {
children: {
optimizationBailout: true,
},
},
};Add information about orphan modules.
booleanexport default {
stats: {
children: {
orphanModules: true,
},
},
};Add output path information.
booleanexport default {
stats: {
children: {
outputPath: true,
},
},
};Add performance hint flags.
booleanexport default {
stats: {
children: {
performance: true,
},
},
};Preset for the default values.
export default {
stats: {
children: {
preset: '...',
},
},
};Show exports provided by modules.
booleanexport default {
stats: {
children: {
providedExports: true,
},
},
};Add public path information.
booleanexport default {
stats: {
children: {
publicPath: true,
},
},
};Add information about the reasons why modules are included.
booleanexport default {
stats: {
children: {
reasons: true,
},
},
};Space to display reasons (groups will be collapsed to fit this space).
numberexport default {
stats: {
children: {
reasonsSpace: 0,
},
},
};Add information about assets that are related to other assets (like SourceMaps for assets).
booleanexport default {
stats: {
children: {
relatedAssets: true,
},
},
};Add information about runtime modules (deprecated: use 'runtimeModules' instead).
booleanexport default {
stats: {
children: {
runtime: true,
},
},
};Add information about runtime modules.
booleanexport default {
stats: {
children: {
runtimeModules: true,
},
},
};Add the source code of modules.
booleanexport default {
stats: {
children: {
source: true,
},
},
};Add timing information.
booleanexport default {
stats: {
children: {
timings: true,
},
},
};Show exports used by modules.
booleanexport default {
stats: {
children: {
usedExports: true,
},
},
};Add webpack version information.
booleanexport default {
stats: {
children: {
version: true,
},
},
};Add warnings.
booleanexport default {
stats: {
children: {
warnings: true,
},
},
};Add warnings count.
booleanexport default {
stats: {
children: {
warningsCount: true,
},
},
};Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.
export default {
stats: {
children: {
warningsFilter: '...',
},
},
};Space to display warnings (value is in number of lines).
numberexport default {
stats: {
children: {
warningsSpace: 0,
},
},
};Display auxiliary assets in chunk groups.
booleanexport default {
stats: {
chunkGroupAuxiliary: true,
},
};Display children of chunk groups.
booleanexport default {
stats: {
chunkGroupChildren: true,
},
};Limit of assets displayed in chunk groups.
numberexport default {
stats: {
chunkGroupMaxAssets: 0,
},
};Display all chunk groups with the corresponding bundles.
booleanexport default {
stats: {
chunkGroups: true,
},
};Add built modules information to chunk information.
booleanexport default {
stats: {
chunkModules: true,
},
};Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).
numberexport default {
stats: {
chunkModulesSpace: 0,
},
};Add the origins of chunks and chunk merging info.
booleanexport default {
stats: {
chunkOrigins: true,
},
};Add information about parent, children and sibling chunks to chunk information.
booleanexport default {
stats: {
chunkRelations: true,
},
};Add chunk information.
booleanexport default {
stats: {
chunks: true,
},
};Sort the chunks by that field.
false | stringexport default {
stats: {
chunksSort: '...',
},
};Enables/Disables colorful output.
export default {
stats: {
colors: true,
},
};Custom color for bold text.
stringexport default {
stats: {
colors: {
bold: '...',
},
},
};Custom color for cyan text.
stringexport default {
stats: {
colors: {
cyan: '...',
},
},
};Custom color for green text.
stringexport default {
stats: {
colors: {
green: '...',
},
},
};Custom color for magenta text.
stringexport default {
stats: {
colors: {
magenta: '...',
},
},
};Custom color for red text.
stringexport default {
stats: {
colors: {
red: '...',
},
},
};Custom color for yellow text.
stringexport default {
stats: {
colors: {
yellow: '...',
},
},
};Context directory for request shortening.
stringexport default {
stats: {
context: '...',
},
};Show chunk modules that are dependencies of other modules of the chunk.
booleanexport default {
stats: {
dependentModules: true,
},
};Add module depth in module graph.
booleanexport default {
stats: {
depth: true,
},
};Display the entry points with the corresponding bundles.
"auto" | booleanexport default {
stats: {
entrypoints: "auto",
},
};Add --env information.
booleanexport default {
stats: {
env: true,
},
};Add cause to errors.
"auto" | booleanexport default {
stats: {
errorCause: "auto",
},
};Add details to errors (like resolving log).
"auto" | booleanexport default {
stats: {
errorDetails: "auto",
},
};Add nested errors to errors (like in AggregateError).
"auto" | booleanexport default {
stats: {
errorErrors: "auto",
},
};Add internal stack trace to errors.
booleanexport default {
stats: {
errorStack: true,
},
};Add errors.
booleanexport default {
stats: {
errors: true,
},
};Add errors count.
booleanexport default {
stats: {
errorsCount: true,
},
};Space to display errors (value is in number of lines).
numberexport default {
stats: {
errorsSpace: 0,
},
};Please use excludeModules instead.
export default {
stats: {
exclude: '...',
},
};Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.
export default {
stats: {
excludeAssets: '...',
},
};Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.
export default {
stats: {
excludeModules: '...',
},
};Group assets by how their are related to chunks.
booleanexport default {
stats: {
groupAssetsByChunk: true,
},
};Group assets by their status (emitted, compared for emit or cached).
booleanexport default {
stats: {
groupAssetsByEmitStatus: true,
},
};Group assets by their extension.
booleanexport default {
stats: {
groupAssetsByExtension: true,
},
};Group assets by their asset info (immutable, development, hotModuleReplacement, etc).
booleanexport default {
stats: {
groupAssetsByInfo: true,
},
};Group assets by their path.
booleanexport default {
stats: {
groupAssetsByPath: true,
},
};Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).
booleanexport default {
stats: {
groupModulesByAttributes: true,
},
};Group modules by their status (cached or built and cacheable).
booleanexport default {
stats: {
groupModulesByCacheStatus: true,
},
};Group modules by their extension.
booleanexport default {
stats: {
groupModulesByExtension: true,
},
};Group modules by their layer.
booleanexport default {
stats: {
groupModulesByLayer: true,
},
};Group modules by their path.
booleanexport default {
stats: {
groupModulesByPath: true,
},
};Group modules by their type.
booleanexport default {
stats: {
groupModulesByType: true,
},
};Group reasons by their origin module.
booleanexport default {
stats: {
groupReasonsByOrigin: true,
},
};Add the hash of the compilation.
booleanexport default {
stats: {
hash: true,
},
};Add ids.
booleanexport default {
stats: {
ids: true,
},
};Add logging output.
"none" | "error" | "warn" | "info" | "log" | "verbose" | booleanexport default {
stats: {
logging: "none",
},
};Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
export default {
stats: {
loggingDebug: '...',
},
};Add stack traces to logging output.
booleanexport default {
stats: {
loggingTrace: true,
},
};Add information about assets inside modules.
booleanexport default {
stats: {
moduleAssets: true,
},
};Add dependencies and origin of warnings/errors.
booleanexport default {
stats: {
moduleTrace: true,
},
};Add built modules information.
booleanexport default {
stats: {
modules: true,
},
};Sort the modules by that field.
false | stringexport default {
stats: {
modulesSort: '...',
},
};Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).
numberexport default {
stats: {
modulesSpace: 0,
},
};Add information about modules nested in other modules (like with module concatenation).
booleanexport default {
stats: {
nestedModules: true,
},
};Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).
numberexport default {
stats: {
nestedModulesSpace: 0,
},
};Show reasons why optimization bailed out for modules.
booleanexport default {
stats: {
optimizationBailout: true,
},
};Add information about orphan modules.
booleanexport default {
stats: {
orphanModules: true,
},
};Add output path information.
booleanexport default {
stats: {
outputPath: true,
},
};Add performance hint flags.
booleanexport default {
stats: {
performance: true,
},
};Preset for the default values.
export default {
stats: {
preset: '...',
},
};Show exports provided by modules.
booleanexport default {
stats: {
providedExports: true,
},
};Add public path information.
booleanexport default {
stats: {
publicPath: true,
},
};Add information about the reasons why modules are included.
booleanexport default {
stats: {
reasons: true,
},
};Space to display reasons (groups will be collapsed to fit this space).
numberexport default {
stats: {
reasonsSpace: 0,
},
};Add information about assets that are related to other assets (like SourceMaps for assets).
booleanexport default {
stats: {
relatedAssets: true,
},
};Add information about runtime modules (deprecated: use 'runtimeModules' instead).
booleanexport default {
stats: {
runtime: true,
},
};Add information about runtime modules.
booleanexport default {
stats: {
runtimeModules: true,
},
};Add the source code of modules.
booleanexport default {
stats: {
source: true,
},
};Add timing information.
booleanexport default {
stats: {
timings: true,
},
};Show exports used by modules.
booleanexport default {
stats: {
usedExports: true,
},
};Add webpack version information.
booleanexport default {
stats: {
version: true,
},
};Add warnings.
booleanexport default {
stats: {
warnings: true,
},
};Add warnings count.
booleanexport default {
stats: {
warningsCount: true,
},
};Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.
export default {
stats: {
warningsFilter: '...',
},
};Space to display warnings (value is in number of lines).
numberexport default {
stats: {
warningsSpace: 0,
},
};Environment to build for. An array of environments to build for all of them when possible.
export default {
target: '...',
};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.
booleanexport default {
validate: true,
};Enter watch mode, which rebuilds on file change.
booleanexport default {
watch: true,
};Options for the watcher.
WatchOptionsexport default {
watchOptions: {},
};Delay the rebuilt after the first change. Value is a time in ms.
numberexport default {
watchOptions: {
aggregateTimeout: 0,
},
};Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').
booleanexport default {
watchOptions: {
followSymlinks: true,
},
};Ignore some files from watching (glob pattern or regexp).
export default {
watchOptions: {
ignored: '...',
},
};Enable polling mode for watching.
export default {
watchOptions: {
poll: true,
},
};Stop watching when stdin stream has ended.
booleanexport default {
watchOptions: {
stdin: true,
},
};