webpack
Version:
Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
1,458 lines (1,457 loc) • 126 kB
JSON
{
"definitions": {
"Amd": {
"description": "Set the value of `require.amd` and `define.amd`. Or disable AMD support.",
"anyOf": [
{
"description": "You can pass `false` to disable AMD support.",
"enum": [false]
},
{
"description": "You can pass an object to set the value of `require.amd` and `define.amd`.",
"type": "object"
}
]
},
"AssetModuleFilename": {
"description": "The filename of asset modules as relative path inside the `output.path` directory.",
"anyOf": [
{
"type": "string",
"absolutePath": false
},
{
"instanceof": "Function",
"tsType": "((pathData: import(\"../lib/Compilation\").PathData, assetInfo?: import(\"../lib/Compilation\").AssetInfo) => string)"
}
]
},
"AuxiliaryComment": {
"description": "Add a comment in the UMD wrapper.",
"anyOf": [
{
"description": "Append the same comment above each import style.",
"type": "string"
},
{
"$ref": "#/definitions/LibraryCustomUmdCommentObject"
}
]
},
"Bail": {
"description": "Report the first error as a hard error instead of tolerating it.",
"type": "boolean"
},
"CacheOptions": {
"description": "Cache generated modules and chunks to improve performance for multiple incremental builds.",
"anyOf": [
{
"description": "Enable in memory caching.",
"enum": [true]
},
{
"$ref": "#/definitions/CacheOptionsNormalized"
}
]
},
"CacheOptionsNormalized": {
"description": "Cache generated modules and chunks to improve performance for multiple incremental builds.",
"anyOf": [
{
"description": "Disable caching.",
"enum": [false]
},
{
"$ref": "#/definitions/MemoryCacheOptions"
},
{
"$ref": "#/definitions/FileCacheOptions"
}
]
},
"Charset": {
"description": "Add charset attribute for script tag.",
"type": "boolean"
},
"ChunkFilename": {
"description": "The filename of non-initial chunks as relative path inside the `output.path` directory.",
"anyOf": [
{
"type": "string",
"absolutePath": false,
"minLength": 1
},
{
"instanceof": "Function",
"tsType": "((pathData: import(\"../lib/Compilation\").PathData, assetInfo?: import(\"../lib/Compilation\").AssetInfo) => string)"
}
]
},
"ChunkFormat": {
"description": "The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins).",
"anyOf": [
{
"enum": ["array-push", "commonjs", false]
},
{
"type": "string"
}
]
},
"ChunkLoadTimeout": {
"description": "Number of milliseconds before chunk request expires.",
"type": "number"
},
"ChunkLoading": {
"description": "The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).",
"anyOf": [
{
"enum": [false]
},
{
"$ref": "#/definitions/ChunkLoadingType"
}
]
},
"ChunkLoadingGlobal": {
"description": "The global variable used by webpack for loading of chunks.",
"type": "string"
},
"ChunkLoadingType": {
"description": "The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).",
"anyOf": [
{
"enum": ["jsonp", "import-scripts", "require", "async-node"]
},
{
"type": "string"
}
]
},
"CompareBeforeEmit": {
"description": "Check if to be emitted file already exists and have the same content before writing to output filesystem.",
"type": "boolean"
},
"Context": {
"description": "The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.",
"type": "string",
"absolutePath": true
},
"CrossOriginLoading": {
"description": "This option enables cross-origin loading of chunks.",
"enum": [false, "anonymous", "use-credentials"]
},
"Dependencies": {
"description": "References to other configurations to depend on.",
"type": "array",
"items": {
"description": "References to another configuration to depend on.",
"type": "string"
}
},
"DevServer": {
"description": "Options for the webpack-dev-server.",
"type": "object"
},
"DevTool": {
"description": "A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).",
"anyOf": [
{
"enum": [false, "eval"]
},
{
"type": "string",
"pattern": "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$"
}
]
},
"DevtoolFallbackModuleFilenameTemplate": {
"description": "Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.",
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Function",
"tsType": "Function"
}
]
},
"DevtoolModuleFilenameTemplate": {
"description": "Filename template string of function for the sources array in a generated SourceMap.",
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Function",
"tsType": "Function"
}
]
},
"DevtoolNamespace": {
"description": "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.",
"type": "string"
},
"EnabledChunkLoadingTypes": {
"description": "List of chunk loading types enabled for use by entry points.",
"type": "array",
"items": {
"$ref": "#/definitions/ChunkLoadingType"
}
},
"EnabledLibraryTypes": {
"description": "List of library types enabled for use by entry points.",
"type": "array",
"items": {
"$ref": "#/definitions/LibraryType"
}
},
"EnabledWasmLoadingTypes": {
"description": "List of wasm loading types enabled for use by entry points.",
"type": "array",
"items": {
"$ref": "#/definitions/WasmLoadingType"
}
},
"Entry": {
"description": "The entry point(s) of the compilation.",
"anyOf": [
{
"$ref": "#/definitions/EntryDynamic"
},
{
"$ref": "#/definitions/EntryStatic"
}
]
},
"EntryDescription": {
"description": "An object with entry point description.",
"type": "object",
"additionalProperties": false,
"properties": {
"chunkLoading": {
"$ref": "#/definitions/ChunkLoading"
},
"dependOn": {
"description": "The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.",
"anyOf": [
{
"description": "The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.",
"type": "array",
"items": {
"description": "An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.",
"type": "string",
"minLength": 1
},
"minItems": 1,
"uniqueItems": true
},
{
"description": "An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.",
"type": "string",
"minLength": 1
}
]
},
"filename": {
"$ref": "#/definitions/Filename"
},
"import": {
"$ref": "#/definitions/EntryItem"
},
"library": {
"$ref": "#/definitions/LibraryOptions"
},
"runtime": {
"$ref": "#/definitions/EntryRuntime"
},
"wasmLoading": {
"$ref": "#/definitions/WasmLoading"
}
},
"required": ["import"]
},
"EntryDescriptionNormalized": {
"description": "An object with entry point description.",
"type": "object",
"additionalProperties": false,
"properties": {
"chunkLoading": {
"$ref": "#/definitions/ChunkLoading"
},
"dependOn": {
"description": "The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.",
"type": "array",
"items": {
"description": "An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.",
"type": "string",
"minLength": 1
},
"minItems": 1,
"uniqueItems": true
},
"filename": {
"$ref": "#/definitions/Filename"
},
"import": {
"description": "Module(s) that are loaded upon startup. The last one is exported.",
"type": "array",
"items": {
"description": "Module that is loaded upon startup. Only the last one is exported.",
"type": "string",
"minLength": 1
},
"minItems": 1,
"uniqueItems": true
},
"library": {
"$ref": "#/definitions/LibraryOptions"
},
"runtime": {
"$ref": "#/definitions/EntryRuntime"
},
"wasmLoading": {
"$ref": "#/definitions/WasmLoading"
}
}
},
"EntryDynamic": {
"description": "A Function returning an entry object, an entry string, an entry array or a promise to these things.",
"instanceof": "Function",
"tsType": "(() => EntryStatic | Promise<EntryStatic>)"
},
"EntryDynamicNormalized": {
"description": "A Function returning a Promise resolving to a normalized entry.",
"instanceof": "Function",
"tsType": "(() => Promise<EntryStaticNormalized>)"
},
"EntryItem": {
"description": "Module(s) that are loaded upon startup.",
"anyOf": [
{
"description": "All modules are loaded upon startup. The last one is exported.",
"type": "array",
"items": {
"description": "A module that is loaded upon startup. Only the last one is exported.",
"type": "string",
"minLength": 1
},
"minItems": 1,
"uniqueItems": true
},
{
"description": "The string is resolved to a module which is loaded upon startup.",
"type": "string",
"minLength": 1
}
]
},
"EntryNormalized": {
"description": "The entry point(s) of the compilation.",
"anyOf": [
{
"$ref": "#/definitions/EntryDynamicNormalized"
},
{
"$ref": "#/definitions/EntryStaticNormalized"
}
]
},
"EntryObject": {
"description": "Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.",
"type": "object",
"additionalProperties": {
"description": "An entry point with name.",
"anyOf": [
{
"$ref": "#/definitions/EntryItem"
},
{
"$ref": "#/definitions/EntryDescription"
}
]
}
},
"EntryRuntime": {
"description": "The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.",
"type": "string",
"minLength": 1
},
"EntryStatic": {
"description": "A static entry description.",
"anyOf": [
{
"$ref": "#/definitions/EntryObject"
},
{
"$ref": "#/definitions/EntryUnnamed"
}
]
},
"EntryStaticNormalized": {
"description": "Multiple entry bundles are created. The key is the entry name. The value is an entry description object.",
"type": "object",
"additionalProperties": {
"description": "An object with entry point description.",
"oneOf": [
{
"$ref": "#/definitions/EntryDescriptionNormalized"
}
]
}
},
"EntryUnnamed": {
"description": "An entry point without name.",
"oneOf": [
{
"$ref": "#/definitions/EntryItem"
}
]
},
"Environment": {
"description": "The abilities of the environment where the webpack generated code should run.",
"type": "object",
"additionalProperties": false,
"properties": {
"arrowFunction": {
"description": "The environment supports arrow functions ('() => { ... }').",
"type": "boolean"
},
"bigIntLiteral": {
"description": "The environment supports BigInt as literal (123n).",
"type": "boolean"
},
"const": {
"description": "The environment supports const and let for variable declarations.",
"type": "boolean"
},
"destructuring": {
"description": "The environment supports destructuring ('{ a, b } = obj').",
"type": "boolean"
},
"dynamicImport": {
"description": "The environment supports an async import() function to import EcmaScript modules.",
"type": "boolean"
},
"forOf": {
"description": "The environment supports 'for of' iteration ('for (const x of array) { ... }').",
"type": "boolean"
},
"module": {
"description": "The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').",
"type": "boolean"
}
}
},
"Experiments": {
"description": "Enables/Disables experiments (experimental features with relax SemVer compatibility).",
"type": "object",
"additionalProperties": false,
"properties": {
"asset": {
"description": "Allow module type 'asset' to generate assets.",
"type": "boolean"
},
"asyncWebAssembly": {
"description": "Support WebAssembly as asynchronous EcmaScript Module.",
"type": "boolean"
},
"outputModule": {
"description": "Allow output javascript files as module source type.",
"type": "boolean"
},
"syncWebAssembly": {
"description": "Support WebAssembly as synchronous EcmaScript Module (outdated).",
"type": "boolean"
},
"topLevelAwait": {
"description": "Allow using top-level-await in EcmaScript Modules.",
"type": "boolean"
}
}
},
"ExternalItem": {
"description": "Specify dependency that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.",
"anyOf": [
{
"description": "Every matched dependency becomes external.",
"instanceof": "RegExp",
"tsType": "RegExp"
},
{
"description": "An exact matched dependency becomes external. The same string is used as external dependency.",
"type": "string"
},
{
"description": "If an dependency matches exactly a property of the object, the property value is used as dependency.",
"type": "object",
"additionalProperties": {
"description": "The dependency used for the external.",
"anyOf": [
{
"type": "array",
"items": {
"description": "A part of the target of the external.",
"type": "string",
"minLength": 1
}
},
{
"description": "`true`: The dependency name is used as target of the external.",
"type": "boolean"
},
{
"description": "The target of the external.",
"type": "string"
},
{
"type": "object"
}
]
}
},
{
"description": "The function is called on each dependency (`function(context, request, callback(err, result))`).",
"instanceof": "Function",
"tsType": "((data: { context: string, request: string }, callback: (err?: Error, result?: string) => void) => void)"
}
]
},
"Externals": {
"description": "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`.",
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/ExternalItem"
}
},
{
"$ref": "#/definitions/ExternalItem"
}
]
},
"ExternalsPresets": {
"description": "Enable presets of externals for specific targets.",
"type": "object",
"additionalProperties": false,
"properties": {
"electron": {
"description": "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.",
"type": "boolean"
},
"electronMain": {
"description": "Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.",
"type": "boolean"
},
"electronPreload": {
"description": "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.",
"type": "boolean"
},
"electronRenderer": {
"description": "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.",
"type": "boolean"
},
"node": {
"description": "Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.",
"type": "boolean"
},
"nwjs": {
"description": "Treat NW.js legacy nw.gui module as external and load it via require() when used.",
"type": "boolean"
},
"web": {
"description": "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).",
"type": "boolean"
},
"webAsync": {
"description": "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).",
"type": "boolean"
}
}
},
"ExternalsType": {
"description": "Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).",
"enum": [
"var",
"module",
"assign",
"this",
"window",
"self",
"global",
"commonjs",
"commonjs2",
"commonjs-module",
"amd",
"amd-require",
"umd",
"umd2",
"jsonp",
"system",
"promise",
"import",
"script"
]
},
"FileCacheOptions": {
"description": "Options object for persistent file-based caching.",
"type": "object",
"additionalProperties": false,
"properties": {
"buildDependencies": {
"description": "Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').",
"type": "object",
"additionalProperties": {
"description": "List of dependencies the build depends on.",
"type": "array",
"items": {
"description": "Request to a dependency (resolved as directory relative to the context directory).",
"type": "string",
"minLength": 1
}
}
},
"cacheDirectory": {
"description": "Base directory for the cache (defaults to node_modules/.cache/webpack).",
"type": "string",
"absolutePath": true
},
"cacheLocation": {
"description": "Locations for the cache (defaults to cacheDirectory / name).",
"type": "string",
"absolutePath": true
},
"hashAlgorithm": {
"description": "Algorithm used for generation the hash (see node.js crypto package).",
"type": "string"
},
"idleTimeout": {
"description": "Time in ms after which idle period the cache storing should happen (only for store: 'pack' or 'idle').",
"type": "number",
"minimum": 0
},
"idleTimeoutForInitialStore": {
"description": "Time in ms after which idle period the initial cache storing should happen (only for store: 'pack' or 'idle').",
"type": "number",
"minimum": 0
},
"immutablePaths": {
"description": "List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.",
"type": "array",
"items": {
"description": "A path to a immutable directory (usually a package manager cache directory).",
"type": "string",
"absolutePath": true,
"minLength": 1
}
},
"managedPaths": {
"description": "List of paths that are managed by a package manager and can be trusted to not be modified otherwise.",
"type": "array",
"items": {
"description": "A path to a managed directory (usually a node_modules directory).",
"type": "string",
"absolutePath": true,
"minLength": 1
}
},
"name": {
"description": "Name for the cache. Different names will lead to different coexisting caches.",
"type": "string"
},
"store": {
"description": "When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).",
"enum": ["pack"]
},
"type": {
"description": "Filesystem caching.",
"enum": ["filesystem"]
},
"version": {
"description": "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.",
"type": "string"
}
},
"required": ["type"]
},
"Filename": {
"description": "Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.",
"anyOf": [
{
"type": "string",
"absolutePath": false,
"minLength": 1
},
{
"instanceof": "Function",
"tsType": "((pathData: import(\"../lib/Compilation\").PathData, assetInfo?: import(\"../lib/Compilation\").AssetInfo) => string)"
}
]
},
"FilterItemTypes": {
"description": "Filtering value, regexp or function.",
"cli": {
"helper": true
},
"anyOf": [
{
"instanceof": "RegExp",
"tsType": "RegExp"
},
{
"type": "string",
"absolutePath": false
},
{
"instanceof": "Function",
"tsType": "((value: string) => boolean)"
}
]
},
"FilterTypes": {
"description": "Filtering values.",
"cli": {
"helper": true
},
"anyOf": [
{
"type": "array",
"items": {
"description": "Rule to filter.",
"cli": {
"helper": true
},
"oneOf": [
{
"$ref": "#/definitions/FilterItemTypes"
}
]
}
},
{
"$ref": "#/definitions/FilterItemTypes"
}
]
},
"GlobalObject": {
"description": "An expression which is used to address the global object/scope in runtime code.",
"type": "string",
"minLength": 1
},
"HashDigest": {
"description": "Digest type used for the hash.",
"type": "string"
},
"HashDigestLength": {
"description": "Number of chars which are used for the hash.",
"type": "number",
"minimum": 1
},
"HashFunction": {
"description": "Algorithm used for generation the hash (see node.js crypto package).",
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"instanceof": "Function",
"tsType": "typeof import('../lib/util/Hash')"
}
]
},
"HashSalt": {
"description": "Any string which is added to the hash to salt it.",
"type": "string",
"minLength": 1
},
"HotUpdateChunkFilename": {
"description": "The filename of the Hot Update Chunks. They are inside the output.path directory.",
"type": "string",
"absolutePath": false
},
"HotUpdateGlobal": {
"description": "The global variable used by webpack for loading of hot update chunks.",
"type": "string"
},
"HotUpdateMainFilename": {
"description": "The filename of the Hot Update Main File. It is inside the `output.path` directory.",
"type": "string",
"absolutePath": false
},
"IgnoreWarnings": {
"description": "Ignore specific warnings.",
"type": "array",
"items": {
"description": "Ignore specific warnings.",
"anyOf": [
{
"description": "A RegExp to select the warning message.",
"instanceof": "RegExp",
"tsType": "RegExp"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"description": "A RegExp to select the origin file for the warning.",
"instanceof": "RegExp",
"tsType": "RegExp"
},
"message": {
"description": "A RegExp to select the warning message.",
"instanceof": "RegExp",
"tsType": "RegExp"
},
"module": {
"description": "A RegExp to select the origin module for the warning.",
"instanceof": "RegExp",
"tsType": "RegExp"
}
}
},
{
"description": "A custom function to select warnings based on the raw warning instance.",
"instanceof": "Function",
"tsType": "((warning: import('../lib/WebpackError'), compilation: import('../lib/Compilation')) => boolean)"
}
]
}
},
"IgnoreWarningsNormalized": {
"description": "Ignore specific warnings.",
"type": "array",
"items": {
"description": "A function to select warnings based on the raw warning instance.",
"instanceof": "Function",
"tsType": "((warning: import('../lib/WebpackError'), compilation: import('../lib/Compilation')) => boolean)"
}
},
"Iife": {
"description": "Wrap javascript code into IIFE's to avoid leaking into global scope.",
"type": "boolean"
},
"ImportFunctionName": {
"description": "The name of the native import() function (can be exchanged for a polyfill).",
"type": "string"
},
"ImportMetaName": {
"description": "The name of the native import.meta object (can be exchanged for a polyfill).",
"type": "string"
},
"InfrastructureLogging": {
"description": "Options for infrastructure level logging.",
"type": "object",
"additionalProperties": false,
"properties": {
"debug": {
"description": "Enable debug logging for specific loggers.",
"anyOf": [
{
"description": "Enable/Disable debug logging for all loggers.",
"type": "boolean"
},
{
"$ref": "#/definitions/FilterTypes"
}
]
},
"level": {
"description": "Log level.",
"enum": ["none", "error", "warn", "info", "log", "verbose"]
}
}
},
"Library": {
"description": "Make the output files a library, exporting the exports of the entry point.",
"anyOf": [
{
"$ref": "#/definitions/LibraryName"
},
{
"$ref": "#/definitions/LibraryOptions"
}
]
},
"LibraryCustomUmdCommentObject": {
"description": "Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.",
"type": "object",
"additionalProperties": false,
"properties": {
"amd": {
"description": "Set comment for `amd` section in UMD.",
"type": "string"
},
"commonjs": {
"description": "Set comment for `commonjs` (exports) section in UMD.",
"type": "string"
},
"commonjs2": {
"description": "Set comment for `commonjs2` (module.exports) section in UMD.",
"type": "string"
},
"root": {
"description": "Set comment for `root` (global variable) section in UMD.",
"type": "string"
}
}
},
"LibraryCustomUmdObject": {
"description": "Description object for all UMD variants of the library name.",
"type": "object",
"additionalProperties": false,
"properties": {
"amd": {
"description": "Name of the exposed AMD library in the UMD.",
"type": "string",
"minLength": 1
},
"commonjs": {
"description": "Name of the exposed commonjs export in the UMD.",
"type": "string",
"minLength": 1
},
"root": {
"description": "Name of the property exposed globally by a UMD library.",
"anyOf": [
{
"type": "array",
"items": {
"description": "Part of the name of the property exposed globally by a UMD library.",
"type": "string",
"minLength": 1
}
},
{
"type": "string",
"minLength": 1
}
]
}
}
},
"LibraryExport": {
"description": "Specify which export should be exposed as library.",
"anyOf": [
{
"type": "array",
"items": {
"description": "Part of the export that should be exposed as library.",
"type": "string",
"minLength": 1
}
},
{
"type": "string",
"minLength": 1
}
]
},
"LibraryName": {
"description": "The name of the library (some types allow unnamed libraries too).",
"anyOf": [
{
"type": "array",
"items": {
"description": "A part of the library name.",
"type": "string",
"minLength": 1
}
},
{
"type": "string",
"minLength": 1
},
{
"$ref": "#/definitions/LibraryCustomUmdObject"
}
]
},
"LibraryOptions": {
"description": "Options for library.",
"type": "object",
"additionalProperties": false,
"properties": {
"auxiliaryComment": {
"$ref": "#/definitions/AuxiliaryComment"
},
"export": {
"$ref": "#/definitions/LibraryExport"
},
"name": {
"$ref": "#/definitions/LibraryName"
},
"type": {
"$ref": "#/definitions/LibraryType"
},
"umdNamedDefine": {
"$ref": "#/definitions/UmdNamedDefine"
}
},
"required": ["type"]
},
"LibraryType": {
"description": "Type of library (types included by default are 'var', 'module', 'assign', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).",
"anyOf": [
{
"enum": [
"var",
"module",
"assign",
"this",
"window",
"self",
"global",
"commonjs",
"commonjs2",
"commonjs-module",
"amd",
"amd-require",
"umd",
"umd2",
"jsonp",
"system"
]
},
{
"type": "string"
}
]
},
"Loader": {
"description": "Custom values available in the loader context.",
"type": "object"
},
"MemoryCacheOptions": {
"description": "Options object for in-memory caching.",
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"description": "In memory caching.",
"enum": ["memory"]
}
},
"required": ["type"]
},
"Mode": {
"description": "Enable production optimizations or development hints.",
"enum": ["development", "production", "none"]
},
"ModuleOptions": {
"description": "Options affecting the normal modules (`NormalModuleFactory`).",
"type": "object",
"additionalProperties": false,
"properties": {
"defaultRules": {
"description": "An array of rules applied by default for modules.",
"cli": {
"exclude": true
},
"oneOf": [
{
"$ref": "#/definitions/RuleSetRules"
}
]
},
"exprContextCritical": {
"description": "Enable warnings for full dynamic dependencies.",
"type": "boolean"
},
"exprContextRecursive": {
"description": "Enable recursive directory lookup for full dynamic dependencies.",
"type": "boolean"
},
"exprContextRegExp": {
"description": "Sets the default regular expression for full dynamic dependencies.",
"anyOf": [
{
"instanceof": "RegExp",
"tsType": "RegExp"
},
{
"type": "boolean"
}
]
},
"exprContextRequest": {
"description": "Set the default request for full dynamic dependencies.",
"type": "string"
},
"noParse": {
"description": "Don't parse files matching. It's matched against the full resolved request.",
"anyOf": [
{
"type": "array",
"items": {
"description": "Don't parse files matching. It's matched against the full resolved request.",
"anyOf": [
{
"description": "A regular expression, when matched the module is not parsed.",
"instanceof": "RegExp",
"tsType": "RegExp"
},
{
"description": "An absolute path, when the module starts with this path it is not parsed.",
"type": "string",
"absolutePath": true
},
{
"instanceof": "Function",
"tsType": "Function"
}
]
},
"minItems": 1
},
{
"description": "A regular expression, when matched the module is not parsed.",
"instanceof": "RegExp",
"tsType": "RegExp"
},
{
"description": "An absolute path, when the module starts with this path it is not parsed.",
"type": "string",
"absolutePath": true
},
{
"instanceof": "Function",
"tsType": "Function"
}
]
},
"rules": {
"description": "An array of rules applied for modules.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetRules"
}
]
},
"strictExportPresence": {
"description": "Emit errors instead of warnings when imported names don't exist in imported module.",
"type": "boolean"
},
"strictThisContextOnImports": {
"description": "Handle the this context correctly according to the spec for namespace objects.",
"type": "boolean"
},
"unknownContextCritical": {
"description": "Enable warnings when using the require function in a not statically analyse-able way.",
"type": "boolean"
},
"unknownContextRecursive": {
"description": "Enable recursive directory lookup when using the require function in a not statically analyse-able way.",
"type": "boolean"
},
"unknownContextRegExp": {
"description": "Sets the regular expression when using the require function in a not statically analyse-able way.",
"anyOf": [
{
"instanceof": "RegExp",
"tsType": "RegExp"
},
{
"type": "boolean"
}
]
},
"unknownContextRequest": {
"description": "Sets the request when using the require function in a not statically analyse-able way.",
"type": "string"
},
"unsafeCache": {
"description": "Cache the resolving of module requests.",
"anyOf": [
{
"type": "boolean"
},
{
"instanceof": "Function",
"tsType": "Function"
}
]
},
"wrappedContextCritical": {
"description": "Enable warnings for partial dynamic dependencies.",
"type": "boolean"
},
"wrappedContextRecursive": {
"description": "Enable recursive directory lookup for partial dynamic dependencies.",
"type": "boolean"
},
"wrappedContextRegExp": {
"description": "Set the inner regular expression for partial dynamic dependencies.",
"instanceof": "RegExp",
"tsType": "RegExp"
}
}
},
"Name": {
"description": "Name of the configuration. Used when loading multiple configurations.",
"type": "string"
},
"Node": {
"description": "Include polyfills or mocks for various node stuff.",
"anyOf": [
{
"enum": [false]
},
{
"$ref": "#/definitions/NodeOptions"
}
]
},
"NodeOptions": {
"description": "Options object for node compatibility features.",
"type": "object",
"additionalProperties": false,
"properties": {
"__dirname": {
"description": "Include a polyfill for the '__dirname' variable.",
"enum": [false, true, "mock", "eval-only"]
},
"__filename": {
"description": "Include a polyfill for the '__filename' variable.",
"enum": [false, true, "mock", "eval-only"]
},
"global": {
"description": "Include a polyfill for the 'global' variable.",
"type": "boolean"
}
}
},
"Optimization": {
"description": "Enables/Disables integrated optimizations.",
"type": "object",
"additionalProperties": false,
"properties": {
"checkWasmTypes": {
"description": "Check for incompatible wasm types when importing/exporting from/to ESM.",
"type": "boolean"
},
"chunkIds": {
"description": "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).",
"enum": [
"natural",
"named",
"deterministic",
"size",
"total-size",
false
]
},
"concatenateModules": {
"description": "Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.",
"type": "boolean"
},
"emitOnErrors": {
"description": "Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.",
"type": "boolean"
},
"flagIncludedChunks": {
"description": "Also flag chunks as loaded which contain a subset of the modules.",
"type": "boolean"
},
"innerGraph": {
"description": "Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.",
"type": "boolean"
},
"mangleExports": {
"description": "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).",
"anyOf": [
{
"enum": ["size", "deterministic"]
},
{
"type": "boolean"
}
]
},
"mangleWasmImports": {
"description": "Reduce size of WASM by changing imports to shorter strings.",
"type": "boolean"
},
"mergeDuplicateChunks": {
"description": "Merge chunks which contain the same modules.",
"type": "boolean"
},
"minimize": {
"description": "Enable minimizing the output. Uses optimization.minimizer.",
"type": "boolean"
},
"minimizer": {
"description": "Minimizer(s) to use for minimizing the output.",
"type": "array",
"cli": {
"exclude": true
},
"items": {
"description": "Plugin of type object or instanceof Function.",
"anyOf": [
{
"enum": ["..."]
},
{
"$ref": "#/definitions/WebpackPluginInstance"
},
{
"$ref": "#/definitions/WebpackPluginFunction"
}
]
}
},
"moduleIds": {
"description": "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).",
"enum": ["natural", "named", "hashed", "deterministic", "size", false]
},
"noEmitOnErrors": {
"description": "Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).",
"type": "boolean",
"cli": {
"exclude": true
}
},
"nodeEnv": {
"description": "Set process.env.NODE_ENV to a specific value.",
"anyOf": [
{
"enum": [false]
},
{
"type": "string"
}
]
},
"portableRecords": {
"description": "Generate records with relative paths to be able to move the context folder.",
"type": "boolean"
},
"providedExports": {
"description": "Figure out which exports are provided by modules to generate more efficient code.",
"type": "boolean"
},
"realContentHash": {
"description": "Use real [contenthash] based on final content of the assets.",
"type": "boolean"
},
"removeAvailableModules": {
"description": "Removes modules from chunks when these modules are already included in all parents.",
"type": "boolean"
},
"removeEmptyChunks": {
"description": "Remove chunks which are empty.",
"type": "boolean"
},
"runtimeChunk": {
"$ref": "#/definitions/OptimizationRuntimeChunk"
},
"sideEffects": {
"description": "Skip over modules which are flagged to contain no side effects when exports are not used.",
"type": "boolean"
},
"splitChunks": {
"description": "Optimize duplication and caching by splitting chunks by shared modules and cache group.",
"anyOf": [
{
"enum": [false]
},
{
"$ref": "#/definitions/OptimizationSplitChunksOptions"
}
]
},
"usedExports": {
"description": "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).",
"anyOf": [
{
"enum": ["global"]
},
{
"type": "boolean"
}
]
}
}
},
"OptimizationRuntimeChunk": {
"description": "Create an additional chunk which contains only the webpack runtime and chunk hash maps.",
"anyOf": [
{
"enum": ["single", "multiple"]
},
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "The name or name factory for the runtime chunks.",
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Function",
"tsType": "Function"
}
]
}
}
}
]
},
"OptimizationRuntimeChunkNormalized": {
"description": "Create an additional chunk which contains only the webpack runtime and chunk hash maps.",
"anyOf": [
{
"enum": [false]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "The name factory for the runtime chunks.",
"instanceof": "Function",
"tsType": "Function"
}
}
}
]
},
"OptimizationSplitChunksCacheGroup": {
"description": "Options object for describing behavior of a cache group selecting modules that should be cached together.",
"type": "object",
"additionalProperties": false,
"properties": {
"automaticNameDelimiter": {
"description": "Sets the name delimiter for created chunks.",
"type": "string",
"minLength": 1
},
"chunks": {
"description": "Select chunks for determining cache group content (defaults to \"initial\", \"initial\" and \"all\" requires adding these chunks to the HTML).",
"anyOf": [
{
"enum": ["initial", "async", "all"]
},
{
"instanceof": "Function",
"tsType": "((chunk: import('../lib/Chunk')) => boolean)"
}
]
},
"enforce": {
"description": "Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.",
"type": "boolean"
},
"enforceSizeThreshold": {
"description": "Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.",
"oneOf": [
{