2020-05-12 21:58:14 +08:00
/ *
2018-09-18 19:57:44 +08:00
* This file was automatically generated .
* DO NOT MODIFY BY HAND .
* Run ` yarn special-lint-fix ` to update
2018-05-08 12:04:57 +08:00
* /
2018-09-18 19:57:44 +08:00
/ * *
2020-02-17 17:27:46 +08:00
* Set the value of ` require.amd ` and ` define.amd ` . Or disable AMD support .
* /
export type Amd =
| false
| {
[ k : string ] : any ;
} ;
/ * *
* Report the first error as a hard error instead of tolerating it .
* /
export type Bail = boolean ;
/ * *
* Cache generated module s and chunks to improve performance for multiple incremental builds .
* /
2020-03-21 21:01:38 +08:00
export type CacheOptions = true | CacheOptionsNormalized ;
2020-02-17 17:27:46 +08:00
/ * *
* Cache generated module s and chunks to improve performance for multiple incremental builds .
* /
2020-03-21 21:01:38 +08:00
export type CacheOptionsNormalized =
| false
| MemoryCacheOptions
| FileCacheOptions ;
2020-02-17 17:27:46 +08:00
/ * *
* The base directory ( absolute path ! ) for resolving the ` entry ` option . If ` output.pathinfo ` is set , the included pathinfo is shortened to this directory .
* /
export type Context = string ;
/ * *
* References to other configurations to depend on .
* /
export type Dependencies = string [ ] ;
/ * *
* A developer tool to enhance debugging ( false | eval | [ inline - | hidden - | eval - ] [ nosources - ] [ cheap - [ module - ] ] source - map ) .
* /
export type DevTool = ( false | "eval" ) | string ;
/ * *
* The entry point ( s ) of the compilation .
2018-09-18 19:57:44 +08:00
* /
2018-09-19 18:59:48 +08:00
export type Entry = EntryDynamic | EntryStatic ;
/ * *
* A Function returning an entry object , an entry string , an entry array or a promise to these things .
* /
2019-02-05 17:06:32 +08:00
export type EntryDynamic = ( ) = > EntryStatic | Promise < EntryStatic > ;
2018-09-19 18:59:48 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* A static entry description .
2018-09-19 18:59:48 +08:00
* /
2020-02-05 04:21:42 +08:00
export type EntryStatic = EntryObject | EntryUnnamed ;
/ * *
2020-03-09 21:14:44 +08:00
* Module ( s ) that are loaded upon startup .
2020-02-05 04:21:42 +08:00
* /
2020-10-29 03:51:08 +08:00
export type EntryItem = string [ ] | string ;
2020-08-26 03:45:56 +08:00
/ * *
* 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 ) .
* /
export type ChunkLoading = false | ChunkLoadingType ;
/ * *
* 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 ) .
* /
export type ChunkLoadingType =
| ( "jsonp" | "import-scripts" | "require" | "async-node" )
| string ;
2020-02-26 20:08:05 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* Specifies the filename of the output file 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 .
2020-02-26 20:08:05 +08:00
* /
2021-01-05 18:11:02 +08:00
export type EntryFilename = FilenameTemplate ;
/ * *
* Specifies the filename template 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 .
* /
export type FilenameTemplate =
2020-02-26 20:08:05 +08:00
| string
| ( (
pathData : import ( "../lib/Compilation" ) . PathData ,
assetInfo? : import ( "../lib/Compilation" ) . AssetInfo
) = > string ) ;
2020-12-22 21:51:09 +08:00
/ * *
* Specifies the layer in which module s of this entrypoint are placed .
* /
export type Layer = null | string ;
2020-02-26 19:34:57 +08:00
/ * *
* Add a comment in the UMD wrapper .
* /
export type AuxiliaryComment = string | LibraryCustomUmdCommentObject ;
/ * *
2020-03-09 21:14:44 +08:00
* Specify which export should be exposed as library .
2020-02-26 19:34:57 +08:00
* /
2020-03-26 16:48:21 +08:00
export type LibraryExport = string [ ] | string ;
2020-02-26 19:34:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* The name of the library ( some types allow unnamed libraries too ) .
2020-02-26 19:34:57 +08:00
* /
2020-03-26 16:48:21 +08:00
export type LibraryName = string [ ] | string | LibraryCustomUmdObject ;
2020-02-26 19:34:57 +08:00
/ * *
2020-08-26 03:45:56 +08:00
* 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 ) .
2020-02-26 19:34:57 +08:00
* /
export type LibraryType =
2020-08-26 03:45:56 +08:00
| (
| "var"
| "module"
| "assign"
| "this"
| "window"
| "self"
| "global"
| "commonjs"
| "commonjs2"
| "commonjs-module"
| "amd"
| "amd-require"
| "umd"
| "umd2"
| "jsonp"
| "system"
)
| string ;
2020-02-26 19:34:57 +08:00
/ * *
* If ` output.libraryTarget ` is set to umd and ` output.library ` is set , setting this to true will name the AMD module .
* /
export type UmdNamedDefine = boolean ;
2020-07-21 16:22:10 +08:00
/ * *
* The name of the runtime chunk . If set a runtime chunk with this name is created or an existing entrypoint is used as runtime .
* /
export type EntryRuntime = string ;
2020-09-09 15:23:01 +08:00
/ * *
* 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 ) .
* /
export type WasmLoading = false | WasmLoadingType ;
/ * *
* 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 ) .
* /
export type WasmLoadingType =
| ( "fetch-streaming" | "fetch" | "async-node" )
| string ;
2018-09-19 18:59:48 +08:00
/ * *
2020-02-05 04:21:42 +08:00
* An entry point without name .
2018-09-19 18:59:48 +08:00
* /
2020-02-05 04:21:42 +08:00
export type EntryUnnamed = EntryItem ;
2018-09-18 19:57:44 +08:00
/ * *
2020-02-17 17:27:46 +08:00
* 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 ` .
2018-09-18 19:57:44 +08:00
* /
2020-03-26 16:48:21 +08:00
export type Externals = ExternalItem [ ] | ExternalItem ;
2018-09-18 21:17:44 +08:00
/ * *
2020-02-17 19:14:51 +08:00
* 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 ` .
2018-09-18 21:17:44 +08:00
* /
export type ExternalItem =
2020-03-26 16:48:21 +08:00
| RegExp
2018-05-08 12:04:57 +08:00
| string
| {
2020-12-22 21:51:09 +08:00
/ * *
* Specify externals depending on the layer .
* /
2021-01-06 18:14:23 +08:00
byLayer ? :
| {
[ k : string ] : ExternalItem ;
}
| ( ( layer : string | null ) = > ExternalItem ) ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* The dependency used for the external .
2018-05-08 12:04:57 +08:00
* /
[ k : string ] :
2020-03-26 16:48:21 +08:00
| string [ ]
| boolean
2020-03-26 23:43:00 +08:00
| string
2018-05-08 12:04:57 +08:00
| {
[ k : string ] : any ;
2020-03-26 16:48:21 +08:00
} ;
2018-05-08 12:04:57 +08:00
}
2020-03-26 16:48:21 +08:00
| ( (
2020-12-22 21:51:09 +08:00
data : {
context : string ;
request : string ;
contextInfo : import ( "../lib/ModuleFactory" ) . ModuleFactoryCreateDataContextInfo ;
} ,
2020-03-26 16:48:21 +08:00
callback : ( err? : Error , result? : string ) = > void
) = > void ) ;
2020-02-18 17:44:55 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Specifies the default type of externals ( 'amd*' , 'umd*' , 'system' and 'jsonp' depend on output . libraryTarget set to the same value ) .
2020-02-18 17:44:55 +08:00
* /
export type ExternalsType =
| "var"
| "module"
| "assign"
| "this"
| "window"
| "self"
| "global"
| "commonjs"
| "commonjs2"
| "commonjs-module"
| "amd"
| "amd-require"
| "umd"
| "umd2"
| "jsonp"
2020-05-15 22:24:11 +08:00
| "system"
| "promise"
2020-06-04 08:06:57 +08:00
| "import"
| "script" ;
2020-09-21 04:08:38 +08:00
/ * *
* Ignore specific warnings .
* /
export type IgnoreWarnings = (
| RegExp
| {
/ * *
* A RegExp to select the origin file for the warning .
* /
file? : RegExp ;
/ * *
* A RegExp to select the warning message .
* /
message? : RegExp ;
/ * *
* A RegExp to select the origin module for the warning .
* /
module ? : RegExp ;
}
| ( (
warning : import ( "../lib/WebpackError" ) ,
compilation : import ( "../lib/Compilation" )
) = > boolean )
) [ ] ;
2019-07-22 14:23:40 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Filtering values .
2019-07-22 14:23:40 +08:00
* /
2020-03-26 16:48:21 +08:00
export type FilterTypes = FilterItemTypes [ ] | FilterItemTypes ;
2019-07-22 14:23:40 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Filtering value , regexp or function .
2019-07-22 14:23:40 +08:00
* /
export type FilterItemTypes = RegExp | string | ( ( value : string ) = > boolean ) ;
2020-02-17 17:27:46 +08:00
/ * *
* Enable production optimizations or development hints .
* /
export type Mode = "development" | "production" | "none" ;
2018-09-18 21:17:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* One or multiple rule conditions .
2018-09-18 21:17:44 +08:00
* /
export type RuleSetConditionOrConditions = RuleSetCondition | RuleSetConditions ;
2018-09-18 19:57:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* A condition matcher .
2018-09-18 19:57:44 +08:00
* /
2018-05-08 12:04:57 +08:00
export type RuleSetCondition =
2018-09-21 14:39:15 +08:00
| RegExp
2018-05-08 12:04:57 +08:00
| string
| {
/ * *
2020-03-09 21:14:44 +08:00
* Logical AND .
2018-05-08 12:04:57 +08:00
* /
and? : RuleSetConditions ;
/ * *
2020-03-09 21:14:44 +08:00
* Logical NOT .
2018-05-08 12:04:57 +08:00
* /
not? : RuleSetConditions ;
/ * *
2020-03-09 21:14:44 +08:00
* Logical OR .
2018-05-08 12:04:57 +08:00
* /
or? : RuleSetConditions ;
2020-03-26 16:48:21 +08:00
}
2020-12-17 18:00:24 +08:00
| ( ( value : string ) = > boolean )
2020-03-26 16:48:21 +08:00
| RuleSetConditions ;
2018-09-18 19:57:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* A list of rule conditions .
2018-09-18 19:57:44 +08:00
* /
2019-11-28 23:19:18 +08:00
export type RuleSetConditions = RuleSetCondition [ ] ;
2018-09-21 17:00:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* One or multiple rule conditions matching an absolute path .
2018-09-21 17:00:44 +08:00
* /
export type RuleSetConditionOrConditionsAbsolute =
| RuleSetConditionAbsolute
| RuleSetConditionsAbsolute ;
/ * *
2020-03-09 21:14:44 +08:00
* A condition matcher matching an absolute path .
2018-09-21 17:00:44 +08:00
* /
export type RuleSetConditionAbsolute =
| RegExp
| string
| {
/ * *
2020-03-09 21:14:44 +08:00
* Logical AND .
2018-09-21 17:00:44 +08:00
* /
and? : RuleSetConditionsAbsolute ;
/ * *
2020-03-09 21:14:44 +08:00
* Logical NOT .
2018-09-21 17:00:44 +08:00
* /
not? : RuleSetConditionsAbsolute ;
/ * *
2020-03-09 21:14:44 +08:00
* Logical OR .
2018-09-21 17:00:44 +08:00
* /
or? : RuleSetConditionsAbsolute ;
2020-03-26 16:48:21 +08:00
}
2020-12-17 18:00:24 +08:00
| ( ( value : string ) = > boolean )
2020-03-26 16:48:21 +08:00
| RuleSetConditionsAbsolute ;
2018-09-21 17:00:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* A list of rule conditions matching an absolute path .
2018-09-21 17:00:44 +08:00
* /
2019-11-28 23:19:18 +08:00
export type RuleSetConditionsAbsolute = RuleSetConditionAbsolute [ ] ;
2018-09-18 19:57:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* A loader request .
2018-09-18 19:57:44 +08:00
* /
2018-05-08 12:04:57 +08:00
export type RuleSetLoader = string ;
2020-03-26 18:37:42 +08:00
/ * *
* Options passed to a loader .
* /
export type RuleSetLoaderOptions =
| string
| {
[ k : string ] : any ;
} ;
2020-09-16 12:58:59 +08:00
/ * *
* Redirect module requests.
* /
export type ResolveAlias =
| {
/ * *
* New request .
* /
alias : string [ ] | false | string ;
/ * *
* Request to be redirected .
* /
name : string ;
/ * *
* Redirect only exact matching request .
* /
onlyModule? : boolean ;
} [ ]
| {
/ * *
* New request .
* /
[ k : string ] : string [ ] | false | string ;
} ;
2018-09-18 19:57:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* A list of descriptions of loaders applied .
2018-09-18 19:57:44 +08:00
* /
2019-05-16 17:31:41 +08:00
export type RuleSetUse =
2020-03-26 16:48:21 +08:00
| RuleSetUseItem [ ]
2020-04-20 13:36:55 +08:00
| ( ( data : {
resource : string ;
realResource : string ;
resourceQuery : string ;
issuer : string ;
compiler : string ;
} ) = > RuleSetUseItem [ ] )
2020-03-26 16:48:21 +08:00
| RuleSetUseItem ;
2018-09-18 19:57:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* A description of an applied loader .
2018-09-18 19:57:44 +08:00
* /
2018-05-08 12:04:57 +08:00
export type RuleSetUseItem =
| {
2018-09-19 16:17:33 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Unique loader options identifier .
2018-09-19 16:17:33 +08:00
* /
ident? : string ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Loader name .
2018-05-08 12:04:57 +08:00
* /
loader? : RuleSetLoader ;
/ * *
2020-03-09 21:14:44 +08:00
* Loader options .
2018-05-08 12:04:57 +08:00
* /
2019-05-16 17:31:41 +08:00
options? : RuleSetLoaderOptions ;
2020-03-26 16:48:21 +08:00
}
| ( ( data : object ) = > RuleSetUseItem | RuleSetUseItem [ ] )
| RuleSetLoader ;
2019-12-06 02:06:50 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* A list of rules .
2019-12-06 02:06:50 +08:00
* /
2020-07-11 16:30:18 +08:00
export type RuleSetRules = ( "..." | RuleSetRule ) [ ] ;
2020-02-17 17:27:46 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* Generator options for asset module s.
2020-02-17 17:27:46 +08:00
* /
2021-01-05 18:11:02 +08:00
export type AssetGeneratorOptions = AssetInlineGeneratorOptions &
AssetResourceGeneratorOptions ;
/ * *
* The options for data url generator .
* /
export type AssetGeneratorDataUrl =
| AssetGeneratorDataUrlOptions
| AssetGeneratorDataUrlFunction ;
/ * *
* Function that executes for module and should return an DataUrl string .
* /
export type AssetGeneratorDataUrlFunction = (
source : string | Buffer ,
context : { filename : string ; module : import ( "../lib/Module" ) }
) = > string ;
/ * *
* Function that executes for module and should return whenever asset should be inlined as DataUrl .
* /
export type AssetParserDataUrlFunction = (
source : string | Buffer ,
context : { filename : string ; module : import ( "../lib/Module" ) }
) = > boolean ;
2020-02-17 17:27:46 +08:00
/ * *
* Include polyfills or mocks for various node stuff .
* /
export type Node = false | NodeOptions ;
2021-01-05 18:11:02 +08:00
/ * *
* Name of the configuration . Used when loading multiple configurations .
* /
export type Name = string ;
2018-09-18 21:17:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Function acting as plugin .
2018-09-18 21:17:44 +08:00
* /
2018-09-19 16:37:53 +08:00
export type WebpackPluginFunction = (
2018-11-22 23:15:20 +08:00
this : import ( "../lib/Compiler" ) ,
2018-09-18 21:17:44 +08:00
compiler : import ( "../lib/Compiler" )
) = > void ;
2020-02-17 17:27:46 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Create an additional chunk which contains only the webpack runtime and chunk hash maps .
2020-02-17 17:27:46 +08:00
* /
export type OptimizationRuntimeChunk =
| ( "single" | "multiple" )
2020-03-26 16:48:21 +08:00
| boolean
2020-02-17 17:27:46 +08:00
| {
/ * *
2020-03-09 21:14:44 +08:00
* The name or name factory for the runtime chunks .
2020-02-17 17:27:46 +08:00
* /
name? : string | Function ;
} ;
2018-12-04 23:40:06 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Size description for limits .
2018-12-04 23:40:06 +08:00
* /
export type OptimizationSplitChunksSizes =
| number
| {
/ * *
2020-03-09 21:14:44 +08:00
* Size of the part of the chunk with the type of the key .
2018-12-04 23:40:06 +08:00
* /
[ k : string ] : number ;
} ;
2020-02-20 03:25:49 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* The filename of asset module s as relative path inside the 'output.path' directory .
2020-02-20 03:25:49 +08:00
* /
export type AssetModuleFilename =
| string
| ( (
pathData : import ( "../lib/Compilation" ) . PathData ,
assetInfo? : import ( "../lib/Compilation" ) . AssetInfo
) = > string ) ;
/ * *
2020-08-17 21:44:32 +08:00
* Add charset attribute for script tag .
2020-02-20 03:25:49 +08:00
* /
2020-08-17 21:44:32 +08:00
export type Charset = boolean ;
2020-02-20 03:25:49 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* 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 .
2020-02-20 03:25:49 +08:00
* /
2021-01-05 18:11:02 +08:00
export type ChunkFilename = FilenameTemplate ;
2020-02-20 03:25:49 +08:00
/ * *
2020-08-26 03:45:56 +08:00
* The format of chunks ( formats included by default are 'array-push' ( web / WebWorker ) , 'commonjs' ( node . js ) , but others might be added by plugins ) .
2020-02-20 03:25:49 +08:00
* /
2020-08-26 03:45:56 +08:00
export type ChunkFormat = ( "array-push" | "commonjs" | false ) | string ;
2020-02-20 03:25:49 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Number of milliseconds before chunk request expires .
2020-02-20 03:25:49 +08:00
* /
export type ChunkLoadTimeout = number ;
2020-08-25 15:16:49 +08:00
/ * *
* The global variable used by webpack for loading of chunks .
* /
export type ChunkLoadingGlobal = string ;
2020-02-20 03:25:49 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Check if to be emitted file already exists and have the same content before writing to output filesystem .
2020-02-20 03:25:49 +08:00
* /
export type CompareBeforeEmit = boolean ;
/ * *
* This option enables cross - origin loading of chunks .
* /
export type CrossOriginLoading = false | "anonymous" | "use-credentials" ;
/ * *
* Similar to ` output.devtoolModuleFilenameTemplate ` , but used in the case of duplicate module identifiers.
* /
export type DevtoolFallbackModuleFilenameTemplate = string | Function ;
/ * *
* Filename template string of function for the sources array in a generated SourceMap .
* /
export type DevtoolModuleFilenameTemplate = string | Function ;
/ * *
* 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 .
* /
export type DevtoolNamespace = string ;
2020-08-26 03:45:56 +08:00
/ * *
* List of chunk loading types enabled for use by entry points .
* /
export type EnabledChunkLoadingTypes = ChunkLoadingType [ ] ;
2020-02-20 03:25:49 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* List of library types enabled for use by entry points .
2020-02-20 03:25:49 +08:00
* /
export type EnabledLibraryTypes = LibraryType [ ] ;
2020-09-09 15:23:01 +08:00
/ * *
* List of wasm loading types enabled for use by entry points .
* /
export type EnabledWasmLoadingTypes = WasmLoadingType [ ] ;
2021-01-05 18:11:02 +08:00
/ * *
* 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 .
* /
export type Filename = FilenameTemplate ;
2020-02-20 03:25:49 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* An expression which is used to address the global object / scope in runtime code .
2020-02-20 03:25:49 +08:00
* /
export type GlobalObject = string ;
/ * *
2020-03-09 21:14:44 +08:00
* Digest type used for the hash .
2020-02-20 03:25:49 +08:00
* /
export type HashDigest = string ;
/ * *
2020-03-09 21:14:44 +08:00
* Number of chars which are used for the hash .
2020-02-20 03:25:49 +08:00
* /
export type HashDigestLength = number ;
/ * *
2020-03-09 21:14:44 +08:00
* Algorithm used for generation the hash ( see node . js crypto package ) .
2020-02-20 03:25:49 +08:00
* /
export type HashFunction = string | typeof import ( "../lib/util/Hash" ) ;
/ * *
2020-03-09 21:14:44 +08:00
* Any string which is added to the hash to salt it .
2020-02-20 03:25:49 +08:00
* /
export type HashSalt = string ;
/ * *
* The filename of the Hot Update Chunks . They are inside the output . path directory .
* /
export type HotUpdateChunkFilename = string ;
/ * *
2020-08-25 15:16:49 +08:00
* The global variable used by webpack for loading of hot update chunks .
2020-02-20 03:25:49 +08:00
* /
2020-08-25 15:16:49 +08:00
export type HotUpdateGlobal = string ;
2020-02-20 03:25:49 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* The filename of the Hot Update Main File . It is inside the 'output.path' directory .
2020-02-20 03:25:49 +08:00
* /
export type HotUpdateMainFilename = string ;
/ * *
2020-03-13 17:03:17 +08:00
* Wrap javascript code into IIFE ' s to avoid leaking into global scope .
2020-02-20 03:25:49 +08:00
* /
export type Iife = boolean ;
2020-05-15 22:24:11 +08:00
/ * *
* The name of the native import ( ) function ( can be exchanged for a polyfill ) .
* /
export type ImportFunctionName = string ;
2020-09-18 16:55:37 +08:00
/ * *
* The name of the native import . meta object ( can be exchanged for a polyfill ) .
* /
export type ImportMetaName = string ;
2020-02-20 03:25:49 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Make the output files a library , exporting the exports of the entry point .
2020-02-20 03:25:49 +08:00
* /
export type Library = LibraryName | LibraryOptions ;
/ * *
* Output javascript files as module source type .
* /
export type OutputModule = boolean ;
/ * *
* The output directory as * * absolute path * * ( required ) .
* /
export type Path = string ;
/ * *
* Include comments with information about the module s.
* /
2020-12-04 18:12:20 +08:00
export type Pathinfo = "verbose" | boolean ;
2020-02-20 03:25:49 +08:00
/ * *
* The ` publicPath ` specifies the public URL address of the output files when referenced in a browser .
* /
export type PublicPath =
2020-09-15 05:27:38 +08:00
| "auto"
2020-02-20 03:25:49 +08:00
| string
| ( (
pathData : import ( "../lib/Compilation" ) . PathData ,
assetInfo? : import ( "../lib/Compilation" ) . AssetInfo
) = > string ) ;
2020-06-25 04:05:21 +08:00
/ * *
* This option enables loading async chunks via a custom script type , such as script type = "module" .
* /
export type ScriptType = false | "text/javascript" | "module" ;
2020-02-20 03:25:49 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* The filename of the SourceMaps for the JavaScript files . They are inside the 'output.path' directory .
2020-02-20 03:25:49 +08:00
* /
export type SourceMapFilename = string ;
/ * *
* Prefixes every line of the source in the bundle with this string .
* /
export type SourcePrefix = string ;
/ * *
* Handles exceptions in module loading correctly at a performance cost .
* /
export type StrictModuleExceptionHandling = boolean ;
/ * *
* A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals .
* /
export type UniqueName = string ;
/ * *
2021-01-05 18:11:02 +08:00
* The filename of WebAssembly module s as relative path inside the 'output.path' directory .
2020-02-20 03:25:49 +08:00
* /
export type WebassemblyModuleFilename = string ;
2020-02-17 17:27:46 +08:00
/ * *
* The number of parallel processed module s in the compilation .
* /
export type Parallelism = number ;
/ * *
2020-03-09 21:14:44 +08:00
* Configuration for web performance recommendations .
2020-02-17 17:27:46 +08:00
* /
export type Performance = false | PerformanceOptions ;
/ * *
* Add additional plugins to the compiler .
* /
export type Plugins = ( WebpackPluginInstance | WebpackPluginFunction ) [ ] ;
/ * *
* Capture timing information for each module .
* /
export type Profile = boolean ;
/ * *
* Store compiler state to a json file .
* /
export type RecordsInputPath = false | string ;
/ * *
* Load compiler state from a json file .
* /
export type RecordsOutputPath = false | string ;
/ * *
* Store / Load compiler state from / to a json file . This will result in persistent ids of module s and chunks . An absolute path is expected . ` recordsPath ` is used for ` recordsInputPath ` and ` recordsOutputPath ` if they left undefined .
* /
export type RecordsPath = false | string ;
/ * *
2020-03-09 21:14:44 +08:00
* Options for the resolver .
2020-02-17 17:27:46 +08:00
* /
export type Resolve = ResolveOptions ;
/ * *
2020-03-09 21:14:44 +08:00
* Options for the resolver when resolving loaders .
2020-02-17 17:27:46 +08:00
* /
export type ResolveLoader = ResolveOptions ;
/ * *
2020-03-09 21:14:44 +08:00
* Stats options object or preset name .
2020-02-17 17:27:46 +08:00
* /
2020-03-21 21:01:38 +08:00
export type StatsValue =
2020-02-17 17:27:46 +08:00
| (
| "none"
2020-09-04 04:09:43 +08:00
| "summary"
2020-02-17 17:27:46 +08:00
| "errors-only"
2020-09-04 04:09:43 +08:00
| "errors-warnings"
2020-02-17 17:27:46 +08:00
| "minimal"
| "normal"
| "detailed"
| "verbose"
2020-03-26 16:48:21 +08:00
)
| boolean
| StatsOptions ;
2020-02-17 17:27:46 +08:00
/ * *
2020-09-10 16:42:29 +08:00
* Environment to build for . An array of environments to build for all of them when possible .
2020-02-17 17:27:46 +08:00
* /
2020-10-29 03:51:08 +08:00
export type Target = string [ ] | false | string ;
2020-02-17 17:27:46 +08:00
/ * *
* Enter watch mode , which rebuilds on file change .
* /
export type Watch = boolean ;
/ * *
* A Function returning a Promise resolving to a normalized entry .
* /
export type EntryDynamicNormalized = ( ) = > Promise < EntryStaticNormalized > ;
/ * *
* The entry point ( s ) of the compilation .
* /
export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized ;
2020-09-21 04:08:38 +08:00
/ * *
* Ignore specific warnings .
* /
export type IgnoreWarningsNormalized = ( (
warning : import ( "../lib/WebpackError" ) ,
compilation : import ( "../lib/Compilation" )
) = > boolean ) [ ] ;
2020-02-17 17:27:46 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Create an additional chunk which contains only the webpack runtime and chunk hash maps .
2020-02-17 17:27:46 +08:00
* /
export type OptimizationRuntimeChunkNormalized =
| false
| {
/ * *
2020-03-09 21:14:44 +08:00
* The name factory for the runtime chunks .
2020-02-17 17:27:46 +08:00
* /
name? : Function ;
} ;
2020-04-20 15:23:10 +08:00
/ * *
* A function returning cache groups .
* /
export type OptimizationSplitChunksGetCacheGroups = (
module : import ( "../lib/Module" )
) = >
| OptimizationSplitChunksCacheGroup
| OptimizationSplitChunksCacheGroup [ ]
| void ;
2018-05-08 12:04:57 +08:00
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options object as provided by the user .
2020-02-17 19:14:51 +08:00
* /
2018-05-08 12:04:57 +08:00
export interface WebpackOptions {
2020-02-17 19:14:51 +08:00
/ * *
* Set the value of ` require.amd ` and ` define.amd ` . Or disable AMD support .
* /
2020-02-17 17:27:46 +08:00
amd? : Amd ;
2020-02-17 19:14:51 +08:00
/ * *
* Report the first error as a hard error instead of tolerating it .
* /
2020-02-17 17:27:46 +08:00
bail? : Bail ;
2020-02-17 19:14:51 +08:00
/ * *
* Cache generated module s and chunks to improve performance for multiple incremental builds .
* /
2020-03-21 21:01:38 +08:00
cache? : CacheOptions ;
2020-02-17 19:14:51 +08:00
/ * *
* The base directory ( absolute path ! ) for resolving the ` entry ` option . If ` output.pathinfo ` is set , the included pathinfo is shortened to this directory .
* /
2020-02-17 17:27:46 +08:00
context? : Context ;
2020-02-17 19:14:51 +08:00
/ * *
* References to other configurations to depend on .
* /
2020-02-17 17:27:46 +08:00
dependencies? : Dependencies ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for the webpack - dev - server .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
devServer? : DevServer ;
2020-02-17 19:14:51 +08:00
/ * *
* A developer tool to enhance debugging ( false | eval | [ inline - | hidden - | eval - ] [ nosources - ] [ cheap - [ module - ] ] source - map ) .
* /
2020-02-17 17:27:46 +08:00
devtool? : DevTool ;
2020-02-17 19:14:51 +08:00
/ * *
* The entry point ( s ) of the compilation .
* /
2018-05-08 12:04:57 +08:00
entry? : Entry ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-13 17:03:17 +08:00
* Enables / Disables experiments ( experimental features with relax SemVer compatibility ) .
2020-02-17 19:14:51 +08:00
* /
2019-06-04 17:26:04 +08:00
experiments? : Experiments ;
2020-02-17 19:14:51 +08:00
/ * *
* 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 ` .
* /
2018-05-08 12:04:57 +08:00
externals? : Externals ;
2020-09-09 21:16:53 +08:00
/ * *
* Enable presets of externals for specific targets .
* /
externalsPresets? : ExternalsPresets ;
2020-02-18 17:44:55 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Specifies the default type of externals ( 'amd*' , 'umd*' , 'system' and 'jsonp' depend on output . libraryTarget set to the same value ) .
2020-02-18 17:44:55 +08:00
* /
externalsType? : ExternalsType ;
2020-09-21 04:08:38 +08:00
/ * *
* Ignore specific warnings .
* /
ignoreWarnings? : IgnoreWarnings ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for infrastructure level logging .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
infrastructureLogging? : InfrastructureLogging ;
2020-02-17 19:14:51 +08:00
/ * *
* Custom values available in the loader context .
* /
2020-02-17 17:27:46 +08:00
loader? : Loader ;
2020-02-17 19:14:51 +08:00
/ * *
* Enable production optimizations or development hints .
* /
2020-02-17 17:27:46 +08:00
mode? : Mode ;
2020-02-17 19:14:51 +08:00
/ * *
* Options affecting the normal module s ( ` NormalModuleFactory ` ) .
* /
2020-03-21 21:01:38 +08:00
module ? : ModuleOptions ;
2020-02-17 19:14:51 +08:00
/ * *
* Name of the configuration . Used when loading multiple configurations .
* /
2020-02-17 17:27:46 +08:00
name? : Name ;
2020-02-17 19:14:51 +08:00
/ * *
* Include polyfills or mocks for various node stuff .
* /
2020-02-17 17:27:46 +08:00
node? : Node ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Enables / Disables integrated optimizations .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
optimization? : Optimization ;
2020-02-17 19:14:51 +08:00
/ * *
* Options affecting the output of the compilation . ` output ` options tell webpack how to write the compiled files to disk .
* /
2020-02-17 17:27:46 +08:00
output? : Output ;
2020-02-17 19:14:51 +08:00
/ * *
* The number of parallel processed module s in the compilation .
* /
2020-02-17 17:27:46 +08:00
parallelism? : Parallelism ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Configuration for web performance recommendations .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
performance? : Performance ;
2020-02-17 19:14:51 +08:00
/ * *
* Add additional plugins to the compiler .
* /
2020-02-17 17:27:46 +08:00
plugins? : Plugins ;
2020-02-17 19:14:51 +08:00
/ * *
* Capture timing information for each module .
* /
2020-02-17 17:27:46 +08:00
profile? : Profile ;
2020-02-17 19:14:51 +08:00
/ * *
* Store compiler state to a json file .
* /
2020-02-17 17:27:46 +08:00
recordsInputPath? : RecordsInputPath ;
2020-02-17 19:14:51 +08:00
/ * *
* Load compiler state from a json file .
* /
2020-02-17 17:27:46 +08:00
recordsOutputPath? : RecordsOutputPath ;
2020-02-17 19:14:51 +08:00
/ * *
* Store / Load compiler state from / to a json file . This will result in persistent ids of module s and chunks . An absolute path is expected . ` recordsPath ` is used for ` recordsInputPath ` and ` recordsOutputPath ` if they left undefined .
* /
2020-02-17 17:27:46 +08:00
recordsPath? : RecordsPath ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for the resolver .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
resolve? : Resolve ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for the resolver when resolving loaders .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
resolveLoader? : ResolveLoader ;
2020-08-26 06:36:16 +08:00
/ * *
* Options affecting how file system snapshots are created and validated .
* /
snapshot? : SnapshotOptions ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Stats options object or preset name .
2020-02-17 19:14:51 +08:00
* /
2020-03-21 21:01:38 +08:00
stats? : StatsValue ;
2020-02-17 19:14:51 +08:00
/ * *
2020-09-10 16:42:29 +08:00
* Environment to build for . An array of environments to build for all of them when possible .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
target? : Target ;
2020-02-17 19:14:51 +08:00
/ * *
* Enter watch mode , which rebuilds on file change .
* /
2020-02-17 17:27:46 +08:00
watch? : Watch ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for the watcher .
2020-02-17 19:14:51 +08:00
* /
2018-12-10 18:34:59 +08:00
watchOptions? : WatchOptions ;
2018-05-08 12:04:57 +08:00
}
2018-10-09 20:30:59 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options object for in - memory caching .
2018-10-09 20:30:59 +08:00
* /
export interface MemoryCacheOptions {
/ * *
2020-03-09 21:14:44 +08:00
* In memory caching .
2018-10-09 20:30:59 +08:00
* /
type : "memory" ;
}
/ * *
2020-03-09 21:14:44 +08:00
* Options object for persistent file - based caching .
2018-10-09 20:30:59 +08:00
* /
export interface FileCacheOptions {
2019-08-09 20:46:42 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Dependencies the build depends on ( in multiple categories , default categories : 'defaultWebpack' ) .
2019-08-09 20:46:42 +08:00
* /
buildDependencies ? : {
/ * *
2020-03-09 21:14:44 +08:00
* List of dependencies the build depends on .
2019-08-09 20:46:42 +08:00
* /
[ k : string ] : string [ ] ;
} ;
2018-10-09 20:30:59 +08:00
/ * *
* Base directory for the cache ( defaults to node_modules / . cache / webpack ) .
* /
cacheDirectory? : string ;
2019-01-26 02:21:45 +08:00
/ * *
* Locations for the cache ( defaults to cacheDirectory / name ) .
* /
cacheLocation? : string ;
2018-10-09 20:30:59 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Algorithm used for generation the hash ( see node . js crypto package ) .
2018-10-09 20:30:59 +08:00
* /
hashAlgorithm? : string ;
2019-01-19 18:47:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Time in ms after which idle period the cache storing should happen ( only for store : 'pack' or 'idle' ) .
2019-01-19 18:47:53 +08:00
* /
idleTimeout? : number ;
2019-01-19 19:07:26 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Time in ms after which idle period the initial cache storing should happen ( only for store : 'pack' or 'idle' ) .
2019-01-19 19:07:26 +08:00
* /
idleTimeoutForInitialStore? : number ;
2019-08-16 17:55:10 +08:00
/ * *
2020-05-02 19:10:55 +08:00
* List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable .
2019-08-16 17:55:10 +08:00
* /
immutablePaths? : string [ ] ;
2019-08-13 04:59:09 +08:00
/ * *
2020-04-10 11:08:17 +08:00
* List of paths that are managed by a package manager and can be trusted to not be modified otherwise .
2019-08-13 04:59:09 +08:00
* /
managedPaths? : string [ ] ;
2018-10-09 20:30:59 +08:00
/ * *
* Name for the cache . Different names will lead to different coexisting caches .
* /
name? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* When to store data to the filesystem . ( pack : Store data when compiler is idle in a single file ) .
2018-10-09 20:30:59 +08:00
* /
2019-10-18 21:23:02 +08:00
store ? : "pack" ;
2018-10-09 20:30:59 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Filesystem caching .
2018-10-09 20:30:59 +08:00
* /
type : "filesystem" ;
/ * *
* 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 .
* /
version? : string ;
}
2018-09-19 18:59:48 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for the webpack - dev - server .
2020-02-17 17:27:46 +08:00
* /
export interface DevServer {
[ k : string ] : any ;
}
/ * *
* Multiple entry bundles are created . The key is the entry name . The value can be a string , an array or an entry description object .
2018-09-19 18:59:48 +08:00
* /
export interface EntryObject {
/ * *
2020-03-09 21:14:44 +08:00
* An entry point with name .
2018-09-19 18:59:48 +08:00
* /
2020-02-05 04:21:42 +08:00
[ k : string ] : EntryItem | EntryDescription ;
2020-02-03 22:46:14 +08:00
}
/ * *
* An object with entry point description .
* /
export interface EntryDescription {
2020-08-26 03:45:56 +08:00
/ * *
* 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 ) .
* /
chunkLoading? : ChunkLoading ;
2020-01-31 23:54:42 +08:00
/ * *
* The entrypoints that the current entrypoint depend on . They must be loaded when this entrypoint is loaded .
* /
2020-10-29 03:51:08 +08:00
dependOn? : string [ ] | string ;
2020-02-07 18:00:25 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* Specifies the filename of the output file 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 .
2020-02-07 18:00:25 +08:00
* /
2021-01-05 18:11:02 +08:00
filename? : EntryFilename ;
2020-02-03 22:46:14 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Module ( s ) that are loaded upon startup .
2020-02-03 22:46:14 +08:00
* /
import : EntryItem ;
2020-12-22 21:51:09 +08:00
/ * *
* Specifies the layer in which module s of this entrypoint are placed .
* /
layer? : Layer ;
2020-02-26 19:34:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for library .
2020-02-26 19:34:57 +08:00
* /
library? : LibraryOptions ;
2020-07-21 16:22:10 +08:00
/ * *
* The name of the runtime chunk . If set a runtime chunk with this name is created or an existing entrypoint is used as runtime .
* /
runtime? : EntryRuntime ;
2020-09-09 15:23:01 +08:00
/ * *
* 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 ) .
* /
wasmLoading? : WasmLoading ;
2020-02-26 19:34:57 +08:00
}
/ * *
2020-03-09 21:14:44 +08:00
* Options for library .
2020-02-26 19:34:57 +08:00
* /
export interface LibraryOptions {
/ * *
* Add a comment in the UMD wrapper .
* /
auxiliaryComment? : AuxiliaryComment ;
/ * *
2020-03-09 21:14:44 +08:00
* Specify which export should be exposed as library .
2020-02-26 19:34:57 +08:00
* /
export ? : LibraryExport ;
/ * *
2020-03-09 21:14:44 +08:00
* The name of the library ( some types allow unnamed libraries too ) .
2020-02-26 19:34:57 +08:00
* /
name? : LibraryName ;
/ * *
2020-08-26 03:45:56 +08:00
* 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 ) .
2020-02-26 19:34:57 +08:00
* /
type : LibraryType ;
/ * *
* If ` output.libraryTarget ` is set to umd and ` output.library ` is set , setting this to true will name the AMD module .
* /
umdNamedDefine? : UmdNamedDefine ;
}
/ * *
* Set explicit comments for ` commonjs ` , ` commonjs2 ` , ` amd ` , and ` root ` .
* /
export interface LibraryCustomUmdCommentObject {
/ * *
2020-03-09 21:14:44 +08:00
* Set comment for ` amd ` section in UMD .
2020-02-26 19:34:57 +08:00
* /
amd? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Set comment for ` commonjs ` ( exports ) section in UMD .
2020-02-26 19:34:57 +08:00
* /
commonjs? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Set comment for ` commonjs2 ` ( module .exports ) section in UMD .
2020-02-26 19:34:57 +08:00
* /
commonjs2? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Set comment for ` root ` ( global variable ) section in UMD .
2020-02-26 19:34:57 +08:00
* /
root? : string ;
}
/ * *
2020-03-09 21:14:44 +08:00
* Description object for all UMD variants of the library name .
2020-02-26 19:34:57 +08:00
* /
export interface LibraryCustomUmdObject {
/ * *
2020-03-09 21:14:44 +08:00
* Name of the exposed AMD library in the UMD .
2020-02-26 19:34:57 +08:00
* /
amd? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Name of the exposed commonjs export in the UMD .
2020-02-26 19:34:57 +08:00
* /
commonjs? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Name of the property exposed globally by a UMD library .
2020-02-26 19:34:57 +08:00
* /
2020-03-26 16:48:21 +08:00
root? : string [ ] | string ;
2018-09-19 18:59:48 +08:00
}
2019-06-04 17:26:04 +08:00
/ * *
2020-03-13 17:03:17 +08:00
* Enables / Disables experiments ( experimental features with relax SemVer compatibility ) .
2019-06-04 17:26:04 +08:00
* /
export interface Experiments {
2019-07-16 19:16:27 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Allow module type 'asset' to generate assets .
2019-07-16 19:16:27 +08:00
* /
asset? : boolean ;
2019-06-05 19:25:15 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Support WebAssembly as asynchronous EcmaScript Module .
2019-06-05 19:25:15 +08:00
* /
asyncWebAssembly? : boolean ;
2020-12-22 21:51:09 +08:00
/ * *
* Enable module and chunk layers .
* /
layers? : boolean ;
2019-10-09 04:29:46 +08:00
/ * *
2020-03-13 17:03:17 +08:00
* Allow output javascript files as module source type .
2019-10-09 04:29:46 +08:00
* /
outputModule? : boolean ;
2019-06-05 19:25:15 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Support WebAssembly as synchronous EcmaScript Module ( outdated ) .
2019-06-05 19:25:15 +08:00
* /
syncWebAssembly? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Allow using top - level - await in EcmaScript Modules .
2019-06-05 19:25:15 +08:00
* /
topLevelAwait? : boolean ;
2019-06-04 17:26:04 +08:00
}
2020-09-09 21:16:53 +08:00
/ * *
* Enable presets of externals for specific targets .
* /
export interface ExternalsPresets {
2020-09-10 16:42:29 +08:00
/ * *
* Treat common electron built - in module s in main and preload context like 'electron' , 'ipc' or 'shell' as external and load them via require ( ) when used .
* /
electron? : boolean ;
2020-09-09 21:16:53 +08:00
/ * *
* Treat electron built - in module s in the main context like 'app' , 'ipc-main' or 'shell' as external and load them via require ( ) when used .
* /
electronMain? : boolean ;
/ * *
* Treat electron built - in module s in the preload context like 'web-frame' , 'ipc-renderer' or 'shell' as external and load them via require ( ) when used .
* /
electronPreload? : boolean ;
2020-09-10 16:42:29 +08:00
/ * *
* Treat electron built - in module s in the renderer context like 'web-frame' , 'ipc-renderer' or 'shell' as external and load them via require ( ) when used .
* /
electronRenderer? : boolean ;
2020-09-09 21:16:53 +08:00
/ * *
* Treat node . js built - in module s like fs , path or vm as external and load them via require ( ) when used .
* /
node? : boolean ;
/ * *
2020-09-10 16:42:29 +08:00
* Treat NW . js legacy nw . gui module as external and load it via require ( ) when used .
2020-09-09 21:16:53 +08:00
* /
2020-09-10 16:42:29 +08:00
nwjs? : boolean ;
2020-09-09 21:16:53 +08:00
/ * *
* 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 ) .
* /
web? : boolean ;
/ * *
* 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 ) .
* /
webAsync? : boolean ;
}
2018-09-18 19:57:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for infrastructure level logging .
2018-09-18 19:57:44 +08:00
* /
2020-02-17 17:27:46 +08:00
export interface InfrastructureLogging {
/ * *
2020-03-09 21:14:44 +08:00
* Enable debug logging for specific loggers .
2020-02-17 17:27:46 +08:00
* /
2020-03-26 16:48:21 +08:00
debug? : boolean | FilterTypes ;
2020-02-17 17:27:46 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Log level .
2020-02-17 17:27:46 +08:00
* /
level ? : "none" | "error" | "warn" | "info" | "log" | "verbose" ;
}
/ * *
* Custom values available in the loader context .
* /
export interface Loader {
[ k : string ] : any ;
}
/ * *
* Options affecting the normal module s ( ` NormalModuleFactory ` ) .
* /
2020-03-21 21:01:38 +08:00
export interface ModuleOptions {
2018-09-19 16:17:33 +08:00
/ * *
* An array of rules applied by default for module s.
* /
defaultRules? : RuleSetRules ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Enable warnings for full dynamic dependencies .
2018-05-08 12:04:57 +08:00
* /
exprContextCritical? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Enable recursive directory lookup for full dynamic dependencies .
2018-05-08 12:04:57 +08:00
* /
exprContextRecursive? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Sets the default regular expression for full dynamic dependencies .
2018-05-08 12:04:57 +08:00
* /
2020-03-26 16:48:21 +08:00
exprContextRegExp? : RegExp | boolean ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Set the default request for full dynamic dependencies .
2018-05-08 12:04:57 +08:00
* /
exprContextRequest? : string ;
2021-01-05 18:11:02 +08:00
/ * *
* Specify options for each generator .
* /
generator ? : {
/ * *
* Generator options for asset module s.
* /
asset? : AssetGeneratorOptions ;
/ * *
* Generator options for asset / inline module s.
* /
"asset/inline" ? : AssetInlineGeneratorOptions ;
/ * *
* Generator options for asset / resource module s.
* /
"asset/resource" ? : AssetResourceGeneratorOptions ;
/ * *
* No generator options are supported for this module type.
* /
javascript? : EmptyGeneratorOptions ;
/ * *
* No generator options are supported for this module type.
* /
"javascript/auto" ? : EmptyGeneratorOptions ;
/ * *
* No generator options are supported for this module type.
* /
"javascript/dynamic" ? : EmptyGeneratorOptions ;
/ * *
* No generator options are supported for this module type.
* /
"javascript/esm" ? : EmptyGeneratorOptions ;
/ * *
* Options for generating .
* /
[ k : string ] : {
[ k : string ] : any ;
} ;
} ;
2018-05-08 12:04:57 +08:00
/ * *
* Don 't parse files matching. It' s matched against the full resolved request .
* /
2020-10-29 03:51:08 +08:00
noParse ? : ( RegExp | string | Function ) [ ] | RegExp | string | Function ;
2021-01-05 18:11:02 +08:00
/ * *
* Specify options for each parser .
* /
parser ? : {
/ * *
* Parser options for asset module s.
* /
asset? : AssetParserOptions ;
/ * *
* No parser options are supported for this module type.
* /
"asset/inline" ? : EmptyParserOptions ;
/ * *
* No parser options are supported for this module type.
* /
"asset/resource" ? : EmptyParserOptions ;
/ * *
* No parser options are supported for this module type.
* /
"asset/source" ? : EmptyParserOptions ;
/ * *
* Parser options for javascript module s.
* /
javascript? : JavascriptParserOptions ;
/ * *
* Parser options for javascript module s.
* /
"javascript/auto" ? : JavascriptParserOptions ;
/ * *
* Parser options for javascript module s.
* /
"javascript/dynamic" ? : JavascriptParserOptions ;
/ * *
* Parser options for javascript module s.
* /
"javascript/esm" ? : JavascriptParserOptions ;
/ * *
* Options for parsing .
* /
[ k : string ] : {
[ k : string ] : any ;
} ;
} ;
2018-05-08 12:04:57 +08:00
/ * *
* An array of rules applied for module s.
* /
rules? : RuleSetRules ;
/ * *
2020-03-09 21:14:44 +08:00
* Emit errors instead of warnings when imported names don ' t exist in imported module .
2018-05-08 12:04:57 +08:00
* /
2018-09-19 16:17:33 +08:00
strictExportPresence? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Handle the this context correctly according to the spec for namespace objects .
2018-09-19 16:17:33 +08:00
* /
strictThisContextOnImports? : boolean ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Enable warnings when using the require function in a not statically analyse - able way .
2018-05-08 12:04:57 +08:00
* /
unknownContextCritical? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Enable recursive directory lookup when using the require function in a not statically analyse - able way .
2018-05-08 12:04:57 +08:00
* /
unknownContextRecursive? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Sets the regular expression when using the require function in a not statically analyse - able way .
2018-05-08 12:04:57 +08:00
* /
2020-03-26 16:48:21 +08:00
unknownContextRegExp? : RegExp | boolean ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Sets the request when using the require function in a not statically analyse - able way .
2018-05-08 12:04:57 +08:00
* /
unknownContextRequest? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Cache the resolving of module requests.
2018-05-08 12:04:57 +08:00
* /
2018-09-19 18:59:48 +08:00
unsafeCache? : boolean | Function ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Enable warnings for partial dynamic dependencies .
2018-05-08 12:04:57 +08:00
* /
wrappedContextCritical? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Enable recursive directory lookup for partial dynamic dependencies .
2018-05-08 12:04:57 +08:00
* /
wrappedContextRecursive? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Set the inner regular expression for partial dynamic dependencies .
2018-05-08 12:04:57 +08:00
* /
2018-09-21 14:39:15 +08:00
wrappedContextRegExp? : RegExp ;
2018-05-08 12:04:57 +08:00
}
2018-09-18 19:57:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* A rule description with conditions and effects for module s.
2018-09-18 19:57:44 +08:00
* /
2018-05-08 12:04:57 +08:00
export interface RuleSetRule {
2018-09-19 16:17:33 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Match the child compiler name .
2018-09-19 16:17:33 +08:00
* /
2018-09-18 21:17:44 +08:00
compiler? : RuleSetConditionOrConditions ;
2020-08-05 05:42:29 +08:00
/ * *
* Match dependency type .
* /
2020-08-08 17:28:41 +08:00
dependency? : RuleSetConditionOrConditions ;
2020-07-17 16:27:48 +08:00
/ * *
* Match values of properties in the description file ( usually package . json ) .
* /
descriptionData ? : {
[ k : string ] : RuleSetConditionOrConditions ;
} ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Enforce this rule as pre or post step .
2018-05-08 12:04:57 +08:00
* /
enforce ? : "pre" | "post" ;
/ * *
2020-03-09 21:14:44 +08:00
* Shortcut for resource . exclude .
2018-05-08 12:04:57 +08:00
* /
2018-09-21 17:00:44 +08:00
exclude? : RuleSetConditionOrConditionsAbsolute ;
2019-11-16 00:27:36 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* The options for the module generator.
2019-11-16 00:27:36 +08:00
* /
generator ? : {
[ k : string ] : any ;
} ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Shortcut for resource . include .
2018-05-08 12:04:57 +08:00
* /
2018-09-21 17:00:44 +08:00
include? : RuleSetConditionOrConditionsAbsolute ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Match the issuer of the module ( The module pointing to this module ) .
2018-05-08 12:04:57 +08:00
* /
2018-09-21 17:00:44 +08:00
issuer? : RuleSetConditionOrConditionsAbsolute ;
2020-12-22 21:51:09 +08:00
/ * *
* Match layer of the issuer of this module ( The module pointing to this module ) .
* /
issuerLayer? : RuleSetConditionOrConditions ;
/ * *
* Specifies the layer in which the module should be placed in .
* /
layer? : string ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Shortcut for use . loader .
2018-05-08 12:04:57 +08:00
* /
2020-03-26 18:37:42 +08:00
loader? : RuleSetLoader ;
2020-05-18 15:00:28 +08:00
/ * *
2020-06-05 19:41:25 +08:00
* Match module mimetype when load from Data URI .
2020-05-18 15:00:28 +08:00
* /
2020-06-05 19:41:25 +08:00
mimetype? : RuleSetConditionOrConditions ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Only execute the first matching rule in this array .
2018-05-08 12:04:57 +08:00
* /
2020-07-11 16:30:18 +08:00
oneOf? : RuleSetRule [ ] ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Shortcut for use . options .
2018-05-08 12:04:57 +08:00
* /
2019-05-16 17:31:41 +08:00
options? : RuleSetLoaderOptions ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for parsing .
2018-05-08 12:04:57 +08:00
* /
parser ? : {
[ k : string ] : any ;
} ;
/ * *
2020-03-09 21:14:44 +08:00
* Match the real resource path of the module .
2018-05-08 12:04:57 +08:00
* /
2019-05-16 17:31:41 +08:00
realResource? : RuleSetConditionOrConditionsAbsolute ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for the resolver .
2018-05-08 12:04:57 +08:00
* /
2018-09-19 16:37:53 +08:00
resolve? : ResolveOptions ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Match the resource path of the module .
2018-05-08 12:04:57 +08:00
* /
2018-09-21 17:00:44 +08:00
resource? : RuleSetConditionOrConditionsAbsolute ;
2020-07-03 23:03:15 +08:00
/ * *
* Match the resource fragment of the module .
* /
resourceFragment? : RuleSetConditionOrConditions ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Match the resource query of the module .
2018-05-08 12:04:57 +08:00
* /
2018-09-18 21:17:44 +08:00
resourceQuery? : RuleSetConditionOrConditions ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Match and execute these rules when this rule is matched .
2018-05-08 12:04:57 +08:00
* /
2020-07-11 16:30:18 +08:00
rules? : RuleSetRule [ ] ;
2018-09-19 16:17:33 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Flags a module as with or without side effects .
2018-09-19 16:17:33 +08:00
* /
sideEffects? : boolean ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Shortcut for resource . test .
2018-05-08 12:04:57 +08:00
* /
2018-09-21 17:00:44 +08:00
test? : RuleSetConditionOrConditionsAbsolute ;
2018-09-19 16:17:33 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Module type to use for the module .
2018-09-19 16:17:33 +08:00
* /
2019-05-22 19:07:10 +08:00
type ? : string ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Modifiers applied to the module when rule is matched .
2018-05-08 12:04:57 +08:00
* /
use? : RuleSetUse ;
}
2018-09-18 19:57:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options object for resolving requests .
2018-09-18 19:57:44 +08:00
* /
2018-09-19 16:37:53 +08:00
export interface ResolveOptions {
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Redirect module requests.
2018-05-08 12:04:57 +08:00
* /
2020-09-16 12:58:59 +08:00
alias? : ResolveAlias ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-26 16:48:21 +08:00
* Fields in the description file ( usually package . json ) which are used to redirect requests inside the module .
2018-05-08 12:04:57 +08:00
* /
2020-03-26 16:48:21 +08:00
aliasFields ? : ( string [ ] | string ) [ ] ;
2020-05-28 06:59:23 +08:00
/ * *
* Extra resolve options per dependency category . Typical categories are "commonjs" , "amd" , "esm" .
* /
byDependency ? : {
/ * *
* Options object for resolving requests .
* /
[ k : string ] : ResolveOptions ;
} ;
2018-10-31 20:53:38 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Enable caching of successfully resolved requests ( cache entries are revalidated ) .
2018-10-31 20:53:38 +08:00
* /
cache? : boolean ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Predicate function to decide which requests should be cached .
2018-05-08 12:04:57 +08:00
* /
2020-06-18 04:17:14 +08:00
cachePredicate ? : (
request : import ( "enhanced-resolve" ) . ResolveRequest
) = > boolean ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Include the context information in the cache identifier when caching .
2018-05-08 12:04:57 +08:00
* /
cacheWithContext? : boolean ;
2020-05-25 18:58:59 +08:00
/ * *
* Condition names for exports field entry point .
* /
conditionNames? : string [ ] ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-26 16:48:21 +08:00
* Filenames used to find a description file ( like a package . json ) .
2018-05-08 12:04:57 +08:00
* /
2020-03-26 16:48:21 +08:00
descriptionFiles? : string [ ] ;
2018-05-08 12:04:57 +08:00
/ * *
2020-07-17 16:27:48 +08:00
* Enforce the resolver to use one of the extensions from the extensions option ( User must specify requests without extension ) .
2018-05-08 12:04:57 +08:00
* /
enforceExtension? : boolean ;
2020-05-25 18:58:59 +08:00
/ * *
2020-05-28 03:47:37 +08:00
* Field names from the description file ( usually package . json ) which are used to provide entry points of a package .
2020-05-25 18:58:59 +08:00
* /
exportsFields? : string [ ] ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Extensions added to the request when trying to find the file .
2018-05-08 12:04:57 +08:00
* /
2020-03-26 16:48:21 +08:00
extensions? : string [ ] ;
2020-09-16 12:58:59 +08:00
/ * *
* Redirect module requests when normal resolving fails .
* /
fallback? : ResolveAlias ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Filesystem for the resolver .
2018-05-08 12:04:57 +08:00
* /
2020-06-18 04:17:14 +08:00
fileSystem? : import ( "../lib/util/fs" ) . InputFileSystem ;
2020-07-17 16:27:48 +08:00
/ * *
* 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 ) .
* /
fullySpecified? : boolean ;
2020-09-16 12:58:59 +08:00
/ * *
* 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 ) .
* /
importsFields? : string [ ] ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Field names from the description file ( package . json ) which are used to find the default entry point .
2018-05-08 12:04:57 +08:00
* /
2020-03-26 16:48:21 +08:00
mainFields ? : ( string [ ] | string ) [ ] ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Filenames used to find the default entry point if there is no description file or main field .
2018-05-08 12:04:57 +08:00
* /
2020-03-26 16:48:21 +08:00
mainFiles? : string [ ] ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Folder names or directory paths where to find module s.
2018-05-08 12:04:57 +08:00
* /
2020-03-26 16:48:21 +08:00
module s? : string [ ] ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Plugins for the resolver .
2018-05-08 12:04:57 +08:00
* /
2020-07-11 16:30:18 +08:00
plugins ? : ( "..." | ResolvePluginInstance ) [ ] ;
2020-09-29 02:43:03 +08:00
/ * *
* Prefer to resolve module requests as relative request and fallback to resolving as module .
* /
preferRelative? : boolean ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Custom resolver .
2018-05-08 12:04:57 +08:00
* /
2020-06-18 04:17:14 +08:00
resolver? : import ( "enhanced-resolve" ) . Resolver ;
2020-06-09 04:54:59 +08:00
/ * *
2020-07-09 14:55:52 +08:00
* 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 .
2020-06-09 04:54:59 +08:00
* /
restrictions ? : ( RegExp | string ) [ ] ;
2020-07-09 05:12:45 +08:00
/ * *
2020-07-09 14:55:52 +08:00
* A list of directories in which requests that are server - relative URLs ( starting with '/' ) are resolved . On non - windows system these requests are tried to resolve as absolute path first .
2020-07-09 05:12:45 +08:00
* /
roots? : string [ ] ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Enable resolving symlinks to the original location .
2018-05-08 12:04:57 +08:00
* /
symlinks? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Enable caching of successfully resolved requests ( cache entries are not revalidated ) .
2018-05-08 12:04:57 +08:00
* /
unsafeCache ? :
| boolean
| {
[ k : string ] : any ;
} ;
/ * *
2020-03-09 21:14:44 +08:00
* Use synchronous filesystem calls for the resolver .
2018-05-08 12:04:57 +08:00
* /
useSyncFileSystemCalls? : boolean ;
}
/ * *
2020-03-09 21:14:44 +08:00
* Plugin instance .
2018-05-08 12:04:57 +08:00
* /
2019-12-06 02:06:50 +08:00
export interface ResolvePluginInstance {
2018-05-08 12:04:57 +08:00
/ * *
* The run point of the plugin , required method .
* /
2020-12-18 20:52:15 +08:00
apply : ( resolver : import ( "enhanced-resolve" ) . Resolver ) = > void ;
2018-05-08 12:04:57 +08:00
[ k : string ] : any ;
}
2021-01-05 18:11:02 +08:00
/ * *
* Generator options for asset / inline module s.
* /
export interface AssetInlineGeneratorOptions {
/ * *
* The options for data url generator .
* /
dataUrl? : AssetGeneratorDataUrl ;
}
/ * *
* Options object for data url generation .
* /
export interface AssetGeneratorDataUrlOptions {
/ * *
* Asset encoding ( defaults to base64 ) .
* /
encoding? : false | "base64" ;
/ * *
* Asset mimetype ( getting from file extension by default ) .
* /
mimetype? : string ;
}
/ * *
* Generator options for asset / resource module s.
* /
export interface AssetResourceGeneratorOptions {
/ * *
* Specifies the filename template 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 .
* /
filename? : FilenameTemplate ;
}
/ * *
* No generator options are supported for this module type.
* /
export interface EmptyGeneratorOptions { }
/ * *
* Parser options for asset module s.
* /
export interface AssetParserOptions {
/ * *
* The condition for inlining the asset as DataUrl .
* /
dataUrlCondition? : AssetParserDataUrlOptions | AssetParserDataUrlFunction ;
}
/ * *
* Options object for DataUrl condition .
* /
export interface AssetParserDataUrlOptions {
/ * *
* Maximum size of asset that should be inline as module s. Default : 8kb.
* /
maxSize? : number ;
}
/ * *
* No parser options are supported for this module type.
* /
export interface EmptyParserOptions { }
/ * *
* Parser options for javascript module s.
* /
export interface JavascriptParserOptions {
/ * *
* Set the value of ` require.amd ` and ` define.amd ` . Or disable AMD support .
* /
amd? : Amd ;
/ * *
* Enable / disable special handling for browserify bundles .
* /
browserify? : boolean ;
/ * *
* Enable / disable parsing of CommonJs syntax .
* /
commonjs? : boolean ;
/ * *
* Enable / disable parsing of EcmaScript Modules syntax .
* /
harmony? : boolean ;
/ * *
* Enable / disable parsing of import ( ) syntax .
* /
import ? : boolean ;
/ * *
* Include polyfills or mocks for various node stuff .
* /
node? : Node ;
/ * *
* Enable / disable parsing of require . context syntax .
* /
requireContext? : boolean ;
/ * *
* Enable / disable parsing of require . ensure syntax .
* /
requireEnsure? : boolean ;
/ * *
* Enable / disable parsing of require . include syntax .
* /
requireInclude? : boolean ;
/ * *
* Enable / disable parsing of require . js special syntax like require . config , requirejs . config , require . version and requirejs . onError .
* /
requireJs? : boolean ;
/ * *
* Enable / disable parsing of System . js special syntax like System . import , System . get , System . set and System . register .
* /
system? : boolean ;
/ * *
* Enable / disable parsing of new URL ( ) syntax .
* /
url? : boolean ;
/ * *
* Disable or configure parsing of WebWorker syntax like new Worker ( ) or navigator . serviceWorker . register ( ) .
* /
worker? : string [ ] | boolean ;
[ k : string ] : any ;
}
2018-09-18 19:57:44 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options object for node compatibility features .
2018-09-18 19:57:44 +08:00
* /
2018-09-19 16:37:53 +08:00
export interface NodeOptions {
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Include a polyfill for the '__dirname' variable .
2018-05-08 12:04:57 +08:00
* /
2020-09-10 16:42:29 +08:00
__dirname? : false | true | "mock" | "eval-only" ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Include a polyfill for the '__filename' variable .
2018-05-08 12:04:57 +08:00
* /
2020-09-10 16:42:29 +08:00
__filename? : false | true | "mock" | "eval-only" ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Include a polyfill for the 'global' variable .
2018-05-08 12:04:57 +08:00
* /
2018-09-19 16:37:53 +08:00
global ? : boolean ;
}
/ * *
2020-03-09 21:14:44 +08:00
* Enables / Disables integrated optimizations .
2018-09-19 16:37:53 +08:00
* /
2020-02-17 17:27:46 +08:00
export interface Optimization {
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Check for incompatible wasm types when importing / exporting from / to ESM .
2018-09-19 16:37:53 +08:00
* /
checkWasmTypes? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* 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 ) .
2018-09-19 16:37:53 +08:00
* /
2018-12-07 19:26:35 +08:00
chunkIds ? :
| "natural"
| "named"
| "deterministic"
| "size"
| "total-size"
| false ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Concatenate module s when possible to generate less module s , more efficient code and enable more optimizations by the minimizer .
2018-09-19 16:37:53 +08:00
* /
concatenateModules? : boolean ;
2020-07-17 21:39:16 +08:00
/ * *
2020-08-03 17:41:54 +08:00
* Emit assets even when errors occur . Critical errors are emitted into the generated code and will cause errors at runtime .
2020-07-17 21:39:16 +08:00
* /
emitOnErrors? : boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Also flag chunks as loaded which contain a subset of the module s.
2018-09-19 16:37:53 +08:00
* /
flagIncludedChunks? : boolean ;
2019-09-03 20:11:50 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Creates a module - internal dependency graph for top level symbols , exports and imports , to improve unused exports detection .
2019-09-03 20:11:50 +08:00
* /
innerGraph? : boolean ;
2019-01-28 17:40:32 +08:00
/ * *
2020-07-31 18:13:30 +08:00
* 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 ) .
2019-01-28 17:40:32 +08:00
* /
2020-07-31 18:13:30 +08:00
mangleExports ? : ( "size" | "deterministic" ) | boolean ;
2018-09-19 16:37:53 +08:00
/ * *
* Reduce size of WASM by changing imports to shorter strings .
* /
mangleWasmImports? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Merge chunks which contain the same module s.
2018-09-19 16:37:53 +08:00
* /
mergeDuplicateChunks? : boolean ;
/ * *
* Enable minimizing the output . Uses optimization . minimizer .
* /
minimize? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Minimizer ( s ) to use for minimizing the output .
2018-09-19 16:37:53 +08:00
* /
2020-07-11 16:30:18 +08:00
minimizer ? : ( "..." | WebpackPluginInstance | WebpackPluginFunction ) [ ] ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* 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 ) .
2018-10-12 22:53:14 +08:00
* /
module Ids? : "natural" | "named" | "hashed" | "deterministic" | "size" | false ;
2018-09-19 16:37:53 +08:00
/ * *
2020-07-17 21:39:16 +08:00
* Avoid emitting assets when errors occur ( deprecated : use 'emitOnErrors' instead ) .
2018-09-19 16:37:53 +08:00
* /
noEmitOnErrors? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Set process . env . NODE_ENV to a specific value .
2018-09-19 16:37:53 +08:00
* /
nodeEnv? : false | string ;
/ * *
2020-03-09 21:14:44 +08:00
* Generate records with relative paths to be able to move the context folder .
2018-09-19 16:37:53 +08:00
* /
portableRecords? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Figure out which exports are provided by module s to generate more efficient code .
2018-09-19 16:37:53 +08:00
* /
providedExports? : boolean ;
2020-08-19 03:14:43 +08:00
/ * *
* Use real [ contenthash ] based on final content of the assets .
* /
realContentHash? : boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Removes module s from chunks when these module s are already included in all parents .
2018-09-19 16:37:53 +08:00
* /
removeAvailableModules? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Remove chunks which are empty .
2018-09-19 16:37:53 +08:00
* /
removeEmptyChunks? : boolean ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Create an additional chunk which contains only the webpack runtime and chunk hash maps .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
runtimeChunk? : OptimizationRuntimeChunk ;
2018-09-19 16:37:53 +08:00
/ * *
2020-10-26 22:32:34 +08:00
* Skip over module s 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 ) .
2018-09-19 16:37:53 +08:00
* /
2020-10-26 22:32:34 +08:00
sideEffects ? : "flag" | boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Optimize duplication and caching by splitting chunks by shared module s and cache group .
2018-09-19 16:37:53 +08:00
* /
splitChunks? : false | OptimizationSplitChunksOptions ;
/ * *
2020-07-28 00:09:48 +08:00
* Figure out which exports are used by module s 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 ) .
2018-09-19 16:37:53 +08:00
* /
2020-07-28 00:09:48 +08:00
usedExports ? : "global" | boolean ;
2018-09-19 16:37:53 +08:00
}
2019-12-06 02:06:50 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Plugin instance .
2019-12-06 02:06:50 +08:00
* /
export interface WebpackPluginInstance {
/ * *
* The run point of the plugin , required method .
* /
apply : ( compiler : import ( "../lib/Compiler" ) ) = > void ;
[ k : string ] : any ;
}
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options object for splitting chunks into smaller chunks .
2018-09-19 16:37:53 +08:00
* /
export interface OptimizationSplitChunksOptions {
/ * *
2020-03-09 21:14:44 +08:00
* Sets the name delimiter for created chunks .
2018-09-19 16:37:53 +08:00
* /
automaticNameDelimiter? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Assign module s to a cache group ( module s from different cache groups are tried to keep in separate chunks , default categories : 'default' , 'defaultVendors' ) .
2018-09-19 16:37:53 +08:00
* /
cacheGroups ? : {
/ * *
2020-03-09 21:14:44 +08:00
* Configuration for a cache group .
2018-09-19 16:37:53 +08:00
* /
[ k : string ] :
| false
2018-09-21 14:39:15 +08:00
| RegExp
2020-03-26 16:48:21 +08:00
| string
| Function
2018-12-11 03:50:37 +08:00
| OptimizationSplitChunksCacheGroup ;
2018-09-19 16:37:53 +08:00
} ;
/ * *
2020-03-09 21:14:44 +08:00
* Select chunks for determining shared module s ( defaults to "async" , "initial" and "all" requires adding these chunks to the HTML ) .
2018-09-19 16:37:53 +08:00
* /
2020-04-20 15:26:08 +08:00
chunks ? :
| ( "initial" | "async" | "all" )
| ( ( chunk : import ( "../lib/Chunk" ) ) = > boolean ) ;
2020-09-29 17:16:24 +08:00
/ * *
* Sets the size types which are used when a number is used for sizes .
* /
defaultSizeTypes? : string [ ] ;
2020-07-13 16:12:17 +08:00
/ * *
* Size threshold at which splitting is enforced and other restrictions ( minRemainingSize , maxAsyncRequests , maxInitialRequests ) are ignored .
* /
enforceSizeThreshold? : OptimizationSplitChunksSizes ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for module s not selected by any other cache group .
2018-09-19 16:37:53 +08:00
* /
fallbackCacheGroup ? : {
/ * *
2020-03-09 21:14:44 +08:00
* Sets the name delimiter for created chunks .
2018-09-19 16:37:53 +08:00
* /
automaticNameDelimiter? : string ;
2018-12-12 03:47:50 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Maximal size hint for the on - demand chunks .
2018-12-12 03:47:50 +08:00
* /
maxAsyncSize? : OptimizationSplitChunksSizes ;
/ * *
2020-03-09 21:14:44 +08:00
* Maximal size hint for the initial chunks .
2018-12-12 03:47:50 +08:00
* /
maxInitialSize? : OptimizationSplitChunksSizes ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Maximal size hint for the created chunks .
2018-09-19 16:37:53 +08:00
* /
2018-12-04 23:40:06 +08:00
maxSize? : OptimizationSplitChunksSizes ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Minimal size for the created chunk .
2018-09-19 16:37:53 +08:00
* /
2018-12-04 23:40:06 +08:00
minSize? : OptimizationSplitChunksSizes ;
2018-09-19 16:37:53 +08:00
} ;
/ * *
2020-03-09 21:14:44 +08:00
* Sets the template for the filename for created chunks .
2018-09-19 16:37:53 +08:00
* /
2019-06-19 04:09:10 +08:00
filename ? :
| string
2019-09-13 17:12:26 +08:00
| ( (
pathData : import ( "../lib/Compilation" ) . PathData ,
assetInfo? : import ( "../lib/Compilation" ) . AssetInfo
) = > string ) ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Prevents exposing path info when creating names for parts splitted by maxSize .
2018-09-19 16:37:53 +08:00
* /
hidePathInfo? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Maximum number of requests which are accepted for on - demand loading .
2018-09-19 16:37:53 +08:00
* /
maxAsyncRequests? : number ;
2018-12-11 03:50:37 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Maximal size hint for the on - demand chunks .
2018-12-11 03:50:37 +08:00
* /
maxAsyncSize? : OptimizationSplitChunksSizes ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Maximum number of initial chunks which are accepted for an entry point .
2018-09-19 16:37:53 +08:00
* /
maxInitialRequests? : number ;
2018-12-11 03:50:37 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Maximal size hint for the initial chunks .
2018-12-11 03:50:37 +08:00
* /
maxInitialSize? : OptimizationSplitChunksSizes ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Maximal size hint for the created chunks .
2018-09-19 16:37:53 +08:00
* /
2018-12-04 23:40:06 +08:00
maxSize? : OptimizationSplitChunksSizes ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Minimum number of times a module has to be duplicated until it ' s considered for splitting .
2018-09-19 16:37:53 +08:00
* /
minChunks? : number ;
2019-05-13 19:10:23 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Minimal size for the chunks the stay after moving the module s to a new chunk .
2019-05-13 19:10:23 +08:00
* /
minRemainingSize? : OptimizationSplitChunksSizes ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Minimal size for the created chunks .
2018-09-19 16:37:53 +08:00
* /
2018-12-04 23:40:06 +08:00
minSize? : OptimizationSplitChunksSizes ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Give chunks created a name ( chunks with equal name are merged ) .
2018-09-19 16:37:53 +08:00
* /
2020-03-26 16:48:21 +08:00
name? : false | string | Function ;
2020-07-28 00:09:48 +08:00
/ * *
* Compare used exports when checking common module s. Modules will only be put in the same chunk when exports are equal .
* /
usedExports? : boolean ;
2018-09-19 16:37:53 +08:00
}
/ * *
2020-03-09 21:14:44 +08:00
* Options object for describing behavior of a cache group selecting module s that should be cached together .
2018-12-11 03:50:37 +08:00
* /
export interface OptimizationSplitChunksCacheGroup {
/ * *
2020-03-09 21:14:44 +08:00
* Sets the name delimiter for created chunks .
2018-12-11 03:50:37 +08:00
* /
automaticNameDelimiter? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Select chunks for determining cache group content ( defaults to "initial" , "initial" and "all" requires adding these chunks to the HTML ) .
2018-12-11 03:50:37 +08:00
* /
2018-12-12 17:46:44 +08:00
chunks ? :
| ( "initial" | "async" | "all" )
2020-04-20 15:23:10 +08:00
| ( ( chunk : import ( "../lib/Chunk" ) ) = > boolean ) ;
2018-12-11 03:50:37 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Ignore minimum size , minimum chunks and maximum requests and always create chunks for this cache group .
2018-12-11 03:50:37 +08:00
* /
enforce? : boolean ;
2020-07-13 16:12:17 +08:00
/ * *
* Size threshold at which splitting is enforced and other restrictions ( minRemainingSize , maxAsyncRequests , maxInitialRequests ) are ignored .
* /
enforceSizeThreshold? : OptimizationSplitChunksSizes ;
2018-12-11 03:50:37 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Sets the template for the filename for created chunks .
2018-12-11 03:50:37 +08:00
* /
2019-06-19 04:09:10 +08:00
filename ? :
| string
2019-09-13 17:12:26 +08:00
| ( (
pathData : import ( "../lib/Compilation" ) . PathData ,
assetInfo? : import ( "../lib/Compilation" ) . AssetInfo
) = > string ) ;
2018-12-11 03:50:37 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Sets the hint for chunk id .
2018-12-11 03:50:37 +08:00
* /
idHint? : string ;
2020-12-22 21:51:09 +08:00
/ * *
* Assign module s to a cache group by module layer.
* /
layer? : RegExp | string | Function ;
2018-12-11 03:50:37 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Maximum number of requests which are accepted for on - demand loading .
2018-12-11 03:50:37 +08:00
* /
maxAsyncRequests? : number ;
2018-12-12 03:47:50 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Maximal size hint for the on - demand chunks .
2018-12-12 03:47:50 +08:00
* /
maxAsyncSize? : OptimizationSplitChunksSizes ;
2018-12-11 03:50:37 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Maximum number of initial chunks which are accepted for an entry point .
2018-12-11 03:50:37 +08:00
* /
maxInitialRequests? : number ;
2018-12-12 03:47:50 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Maximal size hint for the initial chunks .
2018-12-12 03:47:50 +08:00
* /
maxInitialSize? : OptimizationSplitChunksSizes ;
2018-12-11 03:50:37 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Maximal size hint for the created chunks .
2018-12-11 03:50:37 +08:00
* /
maxSize? : OptimizationSplitChunksSizes ;
/ * *
2020-03-09 21:14:44 +08:00
* Minimum number of times a module has to be duplicated until it ' s considered for splitting .
2018-12-11 03:50:37 +08:00
* /
minChunks? : number ;
2019-05-13 19:10:23 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Minimal size for the chunks the stay after moving the module s to a new chunk .
2019-05-13 19:10:23 +08:00
* /
minRemainingSize? : OptimizationSplitChunksSizes ;
2018-12-11 03:50:37 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Minimal size for the created chunk .
2018-12-11 03:50:37 +08:00
* /
minSize? : OptimizationSplitChunksSizes ;
/ * *
2020-03-09 21:14:44 +08:00
* Give chunks for this cache group a name ( chunks with equal name are merged ) .
2018-12-11 03:50:37 +08:00
* /
2020-03-26 16:48:21 +08:00
name? : false | string | Function ;
2018-12-11 03:50:37 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Priority of this cache group .
2018-12-11 03:50:37 +08:00
* /
priority? : number ;
/ * *
2020-03-09 21:14:44 +08:00
* Try to reuse existing chunk ( with name ) when it has matching module s.
2018-12-11 03:50:37 +08:00
* /
reuseExistingChunk? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Assign module s to a cache group by module name.
2018-12-11 03:50:37 +08:00
* /
2020-03-26 16:48:21 +08:00
test? : RegExp | string | Function ;
2018-12-11 03:50:37 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Assign module s to a cache group by module type.
2018-12-11 03:50:37 +08:00
* /
2020-03-26 16:48:21 +08:00
type ? : RegExp | string | Function ;
2020-07-28 00:09:48 +08:00
/ * *
* Compare used exports when checking common module s. Modules will only be put in the same chunk when exports are equal .
* /
usedExports? : boolean ;
2018-12-11 03:50:37 +08:00
}
2018-09-19 16:37:53 +08:00
/ * *
2020-02-17 17:27:46 +08:00
* Options affecting the output of the compilation . ` output ` options tell webpack how to write the compiled files to disk .
2018-09-19 16:37:53 +08:00
* /
2020-02-17 17:27:46 +08:00
export interface Output {
2019-07-16 19:16:27 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* The filename of asset module s as relative path inside the 'output.path' directory .
2019-07-16 19:16:27 +08:00
* /
2020-02-20 03:25:49 +08:00
assetModuleFilename? : AssetModuleFilename ;
2018-09-19 16:37:53 +08:00
/ * *
* Add a comment in the UMD wrapper .
* /
2020-02-20 03:25:49 +08:00
auxiliaryComment? : AuxiliaryComment ;
2018-09-19 16:37:53 +08:00
/ * *
2020-08-17 20:34:23 +08:00
* Add charset attribute for script tag .
2018-09-19 16:37:53 +08:00
* /
2020-08-17 21:44:32 +08:00
charset? : Charset ;
2018-09-19 16:37:53 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* 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 .
2018-09-19 16:37:53 +08:00
* /
2020-02-20 03:25:49 +08:00
chunkFilename? : ChunkFilename ;
2020-08-26 03:45:56 +08:00
/ * *
* The format of chunks ( formats included by default are 'array-push' ( web / WebWorker ) , 'commonjs' ( node . js ) , but others might be added by plugins ) .
* /
chunkFormat? : ChunkFormat ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Number of milliseconds before chunk request expires .
2018-09-19 16:37:53 +08:00
* /
2020-02-20 03:25:49 +08:00
chunkLoadTimeout? : ChunkLoadTimeout ;
2020-08-25 19:37:40 +08:00
/ * *
* 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 ) .
* /
chunkLoading? : ChunkLoading ;
2020-08-25 15:16:49 +08:00
/ * *
* The global variable used by webpack for loading of chunks .
* /
chunkLoadingGlobal? : ChunkLoadingGlobal ;
2019-11-04 23:46:45 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Check if to be emitted file already exists and have the same content before writing to output filesystem .
2019-11-04 23:46:45 +08:00
* /
2020-02-20 03:25:49 +08:00
compareBeforeEmit? : CompareBeforeEmit ;
2018-09-19 16:37:53 +08:00
/ * *
* This option enables cross - origin loading of chunks .
* /
2020-02-20 03:25:49 +08:00
crossOriginLoading? : CrossOriginLoading ;
2018-09-19 16:37:53 +08:00
/ * *
* Similar to ` output.devtoolModuleFilenameTemplate ` , but used in the case of duplicate module identifiers.
* /
2020-02-20 03:25:49 +08:00
devtoolFallbackModuleFilenameTemplate? : DevtoolFallbackModuleFilenameTemplate ;
2018-05-08 12:04:57 +08:00
/ * *
* Filename template string of function for the sources array in a generated SourceMap .
* /
2020-02-20 03:25:49 +08:00
devtoolModuleFilenameTemplate? : DevtoolModuleFilenameTemplate ;
2018-05-08 12:04:57 +08:00
/ * *
* 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 .
* /
2020-02-20 03:25:49 +08:00
devtoolNamespace? : DevtoolNamespace ;
2020-08-26 03:45:56 +08:00
/ * *
* List of chunk loading types enabled for use by entry points .
* /
enabledChunkLoadingTypes? : EnabledChunkLoadingTypes ;
2020-02-20 03:25:49 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* List of library types enabled for use by entry points .
2020-02-20 03:25:49 +08:00
* /
enabledLibraryTypes? : EnabledLibraryTypes ;
2020-09-09 15:23:01 +08:00
/ * *
* List of wasm loading types enabled for use by entry points .
* /
enabledWasmLoadingTypes? : EnabledWasmLoadingTypes ;
2020-09-09 22:37:53 +08:00
/ * *
* The abilities of the environment where the webpack generated code should run .
* /
environment? : Environment ;
2018-05-08 12:04:57 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* 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 .
2018-05-08 12:04:57 +08:00
* /
2020-02-20 03:25:49 +08:00
filename? : Filename ;
2018-09-19 16:17:33 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* An expression which is used to address the global object / scope in runtime code .
2018-09-19 16:17:33 +08:00
* /
2020-02-20 03:25:49 +08:00
globalObject? : GlobalObject ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Digest type used for the hash .
2018-05-08 12:04:57 +08:00
* /
2020-02-20 03:25:49 +08:00
hashDigest? : HashDigest ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Number of chars which are used for the hash .
2018-05-08 12:04:57 +08:00
* /
2020-02-20 03:25:49 +08:00
hashDigestLength? : HashDigestLength ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Algorithm used for generation the hash ( see node . js crypto package ) .
2018-05-08 12:04:57 +08:00
* /
2020-02-20 03:25:49 +08:00
hashFunction? : HashFunction ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Any string which is added to the hash to salt it .
2018-05-08 12:04:57 +08:00
* /
2020-02-20 03:25:49 +08:00
hashSalt? : HashSalt ;
2018-05-08 12:04:57 +08:00
/ * *
* The filename of the Hot Update Chunks . They are inside the output . path directory .
* /
2020-02-20 03:25:49 +08:00
hotUpdateChunkFilename? : HotUpdateChunkFilename ;
2018-05-08 12:04:57 +08:00
/ * *
2020-08-25 15:16:49 +08:00
* The global variable used by webpack for loading of hot update chunks .
2018-05-08 12:04:57 +08:00
* /
2020-08-25 15:16:49 +08:00
hotUpdateGlobal? : HotUpdateGlobal ;
2018-05-08 12:04:57 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* The filename of the Hot Update Main File . It is inside the 'output.path' directory .
2018-05-08 12:04:57 +08:00
* /
2020-02-20 03:25:49 +08:00
hotUpdateMainFilename? : HotUpdateMainFilename ;
2019-10-09 04:29:46 +08:00
/ * *
2020-03-13 17:03:17 +08:00
* Wrap javascript code into IIFE ' s to avoid leaking into global scope .
2019-10-09 04:29:46 +08:00
* /
2020-02-20 03:25:49 +08:00
iife? : Iife ;
2020-05-15 22:24:11 +08:00
/ * *
* The name of the native import ( ) function ( can be exchanged for a polyfill ) .
* /
importFunctionName? : ImportFunctionName ;
2020-09-18 16:55:37 +08:00
/ * *
* The name of the native import . meta object ( can be exchanged for a polyfill ) .
* /
importMetaName? : ImportMetaName ;
2018-05-08 12:04:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Make the output files a library , exporting the exports of the entry point .
2018-05-08 12:04:57 +08:00
* /
2020-02-20 03:25:49 +08:00
library? : Library ;
2018-09-19 16:17:33 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Specify which export should be exposed as library .
2018-09-19 16:17:33 +08:00
* /
2020-02-20 03:25:49 +08:00
libraryExport? : LibraryExport ;
2018-05-08 12:04:57 +08:00
/ * *
2020-08-26 03:45:56 +08:00
* 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 ) .
2018-05-08 12:04:57 +08:00
* /
2020-02-20 03:25:49 +08:00
libraryTarget? : LibraryType ;
2019-10-09 04:29:46 +08:00
/ * *
* Output javascript files as module source type .
* /
2020-02-20 03:25:49 +08:00
module ? : OutputModule ;
2018-05-08 12:04:57 +08:00
/ * *
* The output directory as * * absolute path * * ( required ) .
* /
2020-02-20 03:25:49 +08:00
path? : Path ;
2018-05-08 12:04:57 +08:00
/ * *
* Include comments with information about the module s.
* /
2020-02-20 03:25:49 +08:00
pathinfo? : Pathinfo ;
2018-05-08 12:04:57 +08:00
/ * *
* The ` publicPath ` specifies the public URL address of the output files when referenced in a browser .
* /
2020-02-20 03:25:49 +08:00
publicPath? : PublicPath ;
2020-06-25 04:05:21 +08:00
/ * *
* This option enables loading async chunks via a custom script type , such as script type = "module" .
* /
scriptType? : ScriptType ;
2018-05-08 12:04:57 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* The filename of the SourceMaps for the JavaScript files . They are inside the 'output.path' directory .
2018-05-08 12:04:57 +08:00
* /
2020-02-20 03:25:49 +08:00
sourceMapFilename? : SourceMapFilename ;
2018-05-08 12:04:57 +08:00
/ * *
* Prefixes every line of the source in the bundle with this string .
* /
2020-02-20 03:25:49 +08:00
sourcePrefix? : SourcePrefix ;
2018-05-08 12:04:57 +08:00
/ * *
* Handles exceptions in module loading correctly at a performance cost .
* /
2020-02-20 03:25:49 +08:00
strictModuleExceptionHandling? : StrictModuleExceptionHandling ;
2018-05-08 12:04:57 +08:00
/ * *
* If ` output.libraryTarget ` is set to umd and ` output.library ` is set , setting this to true will name the AMD module .
* /
2020-02-20 03:25:49 +08:00
umdNamedDefine? : UmdNamedDefine ;
2020-02-26 22:50:38 +08:00
/ * *
* A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals .
* /
2020-02-20 03:25:49 +08:00
uniqueName? : UniqueName ;
2020-09-09 15:23:01 +08:00
/ * *
* 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 ) .
* /
wasmLoading? : WasmLoading ;
2018-09-19 16:17:33 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* The filename of WebAssembly module s as relative path inside the 'output.path' directory .
2018-09-19 16:17:33 +08:00
* /
2020-02-20 03:25:49 +08:00
webassemblyModuleFilename? : WebassemblyModuleFilename ;
2020-09-08 00:02:14 +08:00
/ * *
* 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 ) .
* /
workerChunkLoading? : ChunkLoading ;
2020-09-09 15:23:01 +08:00
/ * *
* 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 ) .
* /
workerWasmLoading? : WasmLoading ;
2018-05-08 12:04:57 +08:00
}
2020-09-09 22:37:53 +08:00
/ * *
* The abilities of the environment where the webpack generated code should run .
* /
export interface Environment {
/ * *
* The environment supports arrow functions ( '() => { ... }' ) .
* /
arrowFunction? : boolean ;
/ * *
* The environment supports BigInt as literal ( 123 n ) .
* /
bigIntLiteral? : boolean ;
/ * *
* The environment supports const and let for variable declarations .
* /
const ? : boolean ;
/ * *
2020-09-10 16:42:29 +08:00
* The environment supports destructuring ( '{ a, b } = obj' ) .
2020-09-09 22:37:53 +08:00
* /
2020-09-10 16:42:29 +08:00
destructuring? : boolean ;
2020-09-09 22:37:53 +08:00
/ * *
2020-09-12 04:43:01 +08:00
* The environment supports an async import ( ) function to import EcmaScript module s.
2020-09-09 22:37:53 +08:00
* /
2020-09-12 04:43:01 +08:00
dynamicImport? : boolean ;
2020-09-09 22:37:53 +08:00
/ * *
2020-09-12 04:43:01 +08:00
* The environment supports 'for of' iteration ( 'for (const x of array) { ... }' ) .
2020-09-09 22:37:53 +08:00
* /
2020-09-12 04:43:01 +08:00
forOf? : boolean ;
2020-09-09 22:37:53 +08:00
/ * *
* The environment supports EcmaScript Module syntax to import EcmaScript module s ( import . . . from '...' ) .
* /
module ? : boolean ;
}
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Configuration object for web performance recommendations .
2018-09-19 16:37:53 +08:00
* /
export interface PerformanceOptions {
/ * *
2020-03-09 21:14:44 +08:00
* Filter function to select assets that are checked .
2018-09-19 16:37:53 +08:00
* /
2018-09-19 18:59:48 +08:00
assetFilter? : Function ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Sets the format of the hints : warnings , errors or nothing at all .
2018-09-19 16:37:53 +08:00
* /
hints? : false | "warning" | "error" ;
/ * *
2020-03-13 17:03:17 +08:00
* File size limit ( in bytes ) when exceeded , that webpack will provide performance hints .
2018-09-19 16:37:53 +08:00
* /
maxAssetSize? : number ;
/ * *
2020-03-09 21:14:44 +08:00
* Total size of an entry point ( in bytes ) .
2018-09-19 16:37:53 +08:00
* /
maxEntrypointSize? : number ;
}
2020-08-26 06:36:16 +08:00
/ * *
* Options affecting how file system snapshots are created and validated .
* /
export interface SnapshotOptions {
/ * *
* Options for snapshotting build dependencies to determine if the whole cache need to be invalidated .
* /
buildDependencies ? : {
/ * *
* Use hashes of the content of the files / directories to determine invalidation .
* /
hash? : boolean ;
/ * *
* Use timestamps of the files / directories to determine invalidation .
* /
timestamp? : boolean ;
} ;
/ * *
* List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable .
* /
immutablePaths? : string [ ] ;
/ * *
* List of paths that are managed by a package manager and can be trusted to not be modified otherwise .
* /
managedPaths? : string [ ] ;
/ * *
* Options for snapshotting dependencies of module s to determine if they need to be built again .
* /
module ? : {
/ * *
* Use hashes of the content of the files / directories to determine invalidation .
* /
hash? : boolean ;
/ * *
* Use timestamps of the files / directories to determine invalidation .
* /
timestamp? : boolean ;
} ;
/ * *
* Options for snapshotting dependencies of request resolving to determine if requests need to be re - resolved .
* /
resolve ? : {
/ * *
* Use hashes of the content of the files / directories to determine invalidation .
* /
hash? : boolean ;
/ * *
* Use timestamps of the files / directories to determine invalidation .
* /
timestamp? : boolean ;
} ;
/ * *
* Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re - resolved .
* /
resolveBuildDependencies ? : {
/ * *
* Use hashes of the content of the files / directories to determine invalidation .
* /
hash? : boolean ;
/ * *
* Use timestamps of the files / directories to determine invalidation .
* /
timestamp? : boolean ;
} ;
}
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Stats options object .
2018-09-19 16:37:53 +08:00
* /
export interface StatsOptions {
/ * *
2020-03-09 21:14:44 +08:00
* Fallback value for stats options when an option is not defined ( has precedence over local webpack defaults ) .
2018-09-19 16:37:53 +08:00
* /
all? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add assets information .
2018-09-19 16:37:53 +08:00
* /
assets? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Sort the assets by that field .
2018-09-19 16:37:53 +08:00
* /
assetsSort? : string ;
2020-08-27 15:59:12 +08:00
/ * *
* Space to display assets ( groups will be collapsed to fit this space ) .
* /
assetsSpace? : number ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add built at time information .
2018-09-19 16:37:53 +08:00
* /
builtAt? : boolean ;
/ * *
2020-12-18 01:51:55 +08:00
* Add information about cached ( not built ) module s ( deprecated : use 'cachedModules' instead ) .
2018-09-19 16:37:53 +08:00
* /
cached? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Show cached assets ( setting this to ` false ` only shows emitted files ) .
2018-09-19 16:37:53 +08:00
* /
cachedAssets? : boolean ;
2020-09-02 00:08:09 +08:00
/ * *
* Add information about cached ( not built ) module s.
* /
cachedModules? : boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add children information .
2018-09-19 16:37:53 +08:00
* /
children? : boolean ;
2020-09-03 17:38:38 +08:00
/ * *
* Display auxiliary assets in chunk groups .
* /
chunkGroupAuxiliary? : boolean ;
/ * *
* Display children of chunk groups .
* /
chunkGroupChildren? : boolean ;
/ * *
* Limit of assets displayed in chunk groups .
* /
chunkGroupMaxAssets? : number ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Display all chunk groups with the corresponding bundles .
2018-09-19 16:37:53 +08:00
* /
chunkGroups? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add built module s information to chunk information .
2018-09-19 16:37:53 +08:00
* /
chunkModules? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add the origins of chunks and chunk merging info .
2018-09-19 16:37:53 +08:00
* /
chunkOrigins? : boolean ;
2018-12-22 20:19:13 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add information about parent , children and sibling chunks to chunk information .
2018-12-22 20:19:13 +08:00
* /
chunkRelations? : boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add chunk information .
2018-09-19 16:37:53 +08:00
* /
chunks? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Sort the chunks by that field .
2018-09-19 16:37:53 +08:00
* /
chunksSort? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Enables / Disables colorful output .
2018-09-19 16:37:53 +08:00
* /
colors ? :
| boolean
| {
/ * *
2020-03-09 21:14:44 +08:00
* Custom color for bold text .
2018-09-19 16:37:53 +08:00
* /
bold? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Custom color for cyan text .
2018-09-19 16:37:53 +08:00
* /
cyan? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Custom color for green text .
2018-09-19 16:37:53 +08:00
* /
green? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Custom color for magenta text .
2018-09-19 16:37:53 +08:00
* /
magenta? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Custom color for red text .
2018-09-19 16:37:53 +08:00
* /
red? : string ;
/ * *
2020-03-09 21:14:44 +08:00
* Custom color for yellow text .
2018-09-19 16:37:53 +08:00
* /
yellow? : string ;
} ;
/ * *
2020-03-09 21:14:44 +08:00
* Context directory for request shortening .
2018-09-19 16:37:53 +08:00
* /
context? : string ;
2020-09-02 00:08:09 +08:00
/ * *
* Show chunk module s that are dependencies of other module s of the chunk .
* /
dependentModules? : boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add module depth in module graph.
2018-09-19 16:37:53 +08:00
* /
depth? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Display the entry points with the corresponding bundles .
2018-09-19 16:37:53 +08:00
* /
2020-09-03 17:38:38 +08:00
entrypoints ? : "auto" | boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add -- env information .
2018-09-19 16:37:53 +08:00
* /
env? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add details to errors ( like resolving log ) .
2018-09-19 16:37:53 +08:00
* /
errorDetails? : boolean ;
2019-10-15 04:34:40 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add internal stack trace to errors .
2019-10-15 04:34:40 +08:00
* /
errorStack? : boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add errors .
2018-09-19 16:37:53 +08:00
* /
errors? : boolean ;
2020-09-04 04:09:43 +08:00
/ * *
* Add errors count .
* /
errorsCount? : boolean ;
2018-09-19 16:37:53 +08:00
/ * *
* Please use excludeModules instead .
* /
2020-03-26 16:48:21 +08:00
exclude? : boolean | FilterTypes ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Suppress assets that match the specified filters . Filters can be Strings , RegExps or Functions .
2018-09-19 16:37:53 +08:00
* /
excludeAssets? : FilterTypes ;
/ * *
2020-03-09 21:14:44 +08:00
* Suppress module s that match the specified filters . Filters can be Strings , RegExps , Booleans or Functions .
2018-09-19 16:37:53 +08:00
* /
2020-03-26 16:48:21 +08:00
excludeModules? : boolean | FilterTypes ;
2020-08-27 15:59:12 +08:00
/ * *
* Group assets by how their are related to chunks .
* /
groupAssetsByChunk? : boolean ;
2020-09-02 00:39:57 +08:00
/ * *
* Group assets by their status ( emitted , compared for emit or cached ) .
* /
groupAssetsByEmitStatus? : boolean ;
2020-08-27 15:59:12 +08:00
/ * *
* Group assets by their extension .
* /
groupAssetsByExtension? : boolean ;
/ * *
* Group assets by their asset info ( immutable , development , hotModuleReplacement , etc ) .
* /
groupAssetsByInfo? : boolean ;
/ * *
* Group assets by their path .
* /
groupAssetsByPath? : boolean ;
2020-09-02 00:08:09 +08:00
/ * *
2020-09-02 02:46:45 +08:00
* Group module s by their attributes ( errors , warnings , assets , optional , orphan , or dependent ) .
2020-09-02 00:08:09 +08:00
* /
groupModulesByAttributes? : boolean ;
/ * *
* Group module s by their status ( cached or built and cacheable ) .
* /
groupModulesByCacheStatus? : boolean ;
/ * *
* Group module s by their extension .
* /
groupModulesByExtension? : boolean ;
2020-12-22 21:51:09 +08:00
/ * *
* Group module s by their layer .
* /
groupModulesByLayer? : boolean ;
2020-09-02 00:08:09 +08:00
/ * *
* Group module s by their path .
* /
groupModulesByPath? : boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add the hash of the compilation .
2018-09-19 16:37:53 +08:00
* /
hash? : boolean ;
2020-02-03 18:00:13 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add ids .
2020-02-03 18:00:13 +08:00
* /
ids? : boolean ;
add logging API
Plugins:
Compiler.getInfrastructureLogger(name)
Compilation.getLogger(name)
Loader:
this.getLogger([name])
API equal to console API with these methods:
error, warn, info, log, debug,
time, timeLog, timeEnd,
group, groupCollapsed, groupEnd,
profile, profileEnd,
clear
2019-07-18 23:13:40 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add logging output .
add logging API
Plugins:
Compiler.getInfrastructureLogger(name)
Compilation.getLogger(name)
Loader:
this.getLogger([name])
API equal to console API with these methods:
error, warn, info, log, debug,
time, timeLog, timeEnd,
group, groupCollapsed, groupEnd,
profile, profileEnd,
clear
2019-07-18 23:13:40 +08:00
* /
2020-03-26 16:48:21 +08:00
logging ? : ( "none" | "error" | "warn" | "info" | "log" | "verbose" ) | boolean ;
2019-07-22 14:23:40 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Include debug logging of specified loggers ( i . e . for plugins or loaders ) . Filters can be Strings , RegExps or Functions .
2019-07-22 14:23:40 +08:00
* /
2020-03-26 16:48:21 +08:00
loggingDebug? : boolean | FilterTypes ;
add logging API
Plugins:
Compiler.getInfrastructureLogger(name)
Compilation.getLogger(name)
Loader:
this.getLogger([name])
API equal to console API with these methods:
error, warn, info, log, debug,
time, timeLog, timeEnd,
group, groupCollapsed, groupEnd,
profile, profileEnd,
clear
2019-07-18 23:13:40 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add stack traces to logging output .
add logging API
Plugins:
Compiler.getInfrastructureLogger(name)
Compilation.getLogger(name)
Loader:
this.getLogger([name])
API equal to console API with these methods:
error, warn, info, log, debug,
time, timeLog, timeEnd,
group, groupCollapsed, groupEnd,
profile, profileEnd,
clear
2019-07-18 23:13:40 +08:00
* /
loggingTrace? : boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add information about assets inside module s.
2018-09-19 16:37:53 +08:00
* /
module Assets? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add dependencies and origin of warnings / errors .
2018-09-19 16:37:53 +08:00
* /
module Trace? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add built module s information .
2018-09-19 16:37:53 +08:00
* /
module s? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Sort the module s by that field .
2018-09-19 16:37:53 +08:00
* /
module sSort? : string ;
2020-09-02 00:08:09 +08:00
/ * *
2021-01-04 22:43:47 +08:00
* Space to display module s ( groups will be collapsed to fit this space , value is in number of module s / g r o u p s ) .
2020-09-02 00:08:09 +08:00
* /
module sSpace? : number ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add information about module s nested in other module s ( like with module concatenation ) .
2018-09-19 16:37:53 +08:00
* /
nestedModules? : boolean ;
2020-12-29 23:09:22 +08:00
/ * *
2021-01-04 22:43:47 +08:00
* Space to display module s nested within other module s ( groups will be collapsed to fit this space , value is in number of module s / g r o u p ) .
2020-12-29 23:09:22 +08:00
* /
nestedModulesSpace? : number ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Show reasons why optimization bailed out for module s.
2018-09-19 16:37:53 +08:00
* /
optimizationBailout? : boolean ;
2018-09-25 22:07:42 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add information about orphan module s.
2018-09-25 22:07:42 +08:00
* /
orphanModules? : boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add output path information .
2018-09-19 16:37:53 +08:00
* /
outputPath? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add performance hint flags .
2018-09-19 16:37:53 +08:00
* /
performance? : boolean ;
2018-12-22 18:58:29 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Preset for the default values .
2018-12-22 18:58:29 +08:00
* /
2020-03-26 23:43:00 +08:00
preset? : boolean | string ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Show exports provided by module s.
2018-09-19 16:37:53 +08:00
* /
providedExports? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add public path information .
2018-09-19 16:37:53 +08:00
* /
publicPath? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add information about the reasons why module s are included .
2018-09-19 16:37:53 +08:00
* /
reasons? : boolean ;
2020-08-01 12:21:29 +08:00
/ * *
* Add information about assets that are related to other assets ( like SourceMaps for assets ) .
* /
relatedAssets? : boolean ;
2020-12-18 01:51:55 +08:00
/ * *
* Add information about runtime module s ( deprecated : use 'runtimeModules' instead ) .
* /
runtime? : boolean ;
2018-11-28 20:07:40 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add information about runtime module s.
2018-11-28 20:07:40 +08:00
* /
2020-09-02 16:51:10 +08:00
runtimeModules? : boolean ;
2018-09-19 16:37:53 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Add the source code of module s.
2018-09-19 16:37:53 +08:00
* /
source? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add timing information .
2018-09-19 16:37:53 +08:00
* /
timings? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Show exports used by module s.
2018-09-19 16:37:53 +08:00
* /
usedExports? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add webpack version information .
2018-09-19 16:37:53 +08:00
* /
version? : boolean ;
/ * *
2020-03-09 21:14:44 +08:00
* Add warnings .
2018-09-19 16:37:53 +08:00
* /
warnings? : boolean ;
/ * *
2020-09-04 04:09:43 +08:00
* Add warnings count .
* /
warningsCount? : boolean ;
/ * *
* Suppress listing warnings that match the specified filters ( they will still be counted ) . Filters can be Strings , RegExps or Functions .
2018-09-19 16:37:53 +08:00
* /
warningsFilter? : FilterTypes ;
}
2018-12-10 18:34:59 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for the watcher .
2018-12-10 18:34:59 +08:00
* /
export interface WatchOptions {
/ * *
* Delay the rebuilt after the first change . Value is a time in ms .
* /
aggregateTimeout? : number ;
2020-10-21 20:33:34 +08:00
/ * *
2020-10-23 00:54:31 +08:00
* Resolve symlinks and watch symlink and real file . This is usually not needed as webpack already resolves symlinks ( 'resolve.symlinks' ) .
2020-10-21 20:33:34 +08:00
* /
followSymlinks? : boolean ;
2018-12-10 18:34:59 +08:00
/ * *
2020-09-21 09:44:42 +08:00
* Ignore some files from watching ( glob pattern or regexp ) .
2018-12-10 18:34:59 +08:00
* /
2020-09-21 09:44:42 +08:00
ignored? : string [ ] | RegExp | string ;
2018-12-10 18:34:59 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Enable polling mode for watching .
2018-12-10 18:34:59 +08:00
* /
2020-03-26 16:48:21 +08:00
poll? : number | boolean ;
2018-12-10 18:34:59 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Stop watching when stdin stream has ended .
2018-12-10 18:34:59 +08:00
* /
stdin? : boolean ;
}
2020-02-26 20:08:05 +08:00
/ * *
* An object with entry point description .
* /
export interface EntryDescriptionNormalized {
2020-08-26 03:45:56 +08:00
/ * *
* 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 ) .
* /
chunkLoading? : ChunkLoading ;
2020-02-26 20:08:05 +08:00
/ * *
* The entrypoints that the current entrypoint depend on . They must be loaded when this entrypoint is loaded .
* /
2020-10-29 03:51:08 +08:00
dependOn? : string [ ] ;
2020-02-26 20:08:05 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* 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 .
2020-02-26 20:08:05 +08:00
* /
filename? : Filename ;
/ * *
* Module ( s ) that are loaded upon startup . The last one is exported .
* /
2020-10-29 03:51:08 +08:00
import ? : string [ ] ;
2020-12-22 21:51:09 +08:00
/ * *
* Specifies the layer in which module s of this entrypoint are placed .
* /
layer? : Layer ;
2020-02-26 19:34:57 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for library .
2020-02-26 19:34:57 +08:00
* /
library? : LibraryOptions ;
2020-07-21 16:22:10 +08:00
/ * *
* The name of the runtime chunk . If set a runtime chunk with this name is created or an existing entrypoint is used as runtime .
* /
runtime? : EntryRuntime ;
2020-09-09 15:23:01 +08:00
/ * *
* 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 ) .
* /
wasmLoading? : WasmLoading ;
2020-02-26 20:08:05 +08:00
}
2020-02-17 17:27:46 +08:00
/ * *
* Multiple entry bundles are created . The key is the entry name . The value is an entry description object .
* /
export interface EntryStaticNormalized {
/ * *
* An object with entry point description .
* /
2020-02-26 20:08:05 +08:00
[ k : string ] : EntryDescriptionNormalized ;
2020-02-17 17:27:46 +08:00
}
2020-02-20 03:25:49 +08:00
/ * *
* Normalized options affecting the output of the compilation . ` output ` options tell webpack how to write the compiled files to disk .
* /
export interface OutputNormalized {
/ * *
2021-01-05 18:11:02 +08:00
* The filename of asset module s as relative path inside the 'output.path' directory .
2020-02-20 03:25:49 +08:00
* /
assetModuleFilename? : AssetModuleFilename ;
/ * *
2020-08-17 21:44:32 +08:00
* Add charset attribute for script tag .
2020-02-20 03:25:49 +08:00
* /
2020-08-17 21:44:32 +08:00
charset? : Charset ;
2020-02-20 03:25:49 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* 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 .
2020-02-20 03:25:49 +08:00
* /
chunkFilename? : ChunkFilename ;
2020-08-26 03:45:56 +08:00
/ * *
* The format of chunks ( formats included by default are 'array-push' ( web / WebWorker ) , 'commonjs' ( node . js ) , but others might be added by plugins ) .
* /
chunkFormat? : ChunkFormat ;
2020-02-20 03:25:49 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Number of milliseconds before chunk request expires .
2020-02-20 03:25:49 +08:00
* /
chunkLoadTimeout? : ChunkLoadTimeout ;
2020-08-25 19:37:40 +08:00
/ * *
* 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 ) .
* /
chunkLoading? : ChunkLoading ;
2020-08-25 15:16:49 +08:00
/ * *
* The global variable used by webpack for loading of chunks .
* /
chunkLoadingGlobal? : ChunkLoadingGlobal ;
2020-02-20 03:25:49 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Check if to be emitted file already exists and have the same content before writing to output filesystem .
2020-02-20 03:25:49 +08:00
* /
compareBeforeEmit? : CompareBeforeEmit ;
/ * *
* This option enables cross - origin loading of chunks .
* /
crossOriginLoading? : CrossOriginLoading ;
/ * *
* Similar to ` output.devtoolModuleFilenameTemplate ` , but used in the case of duplicate module identifiers.
* /
devtoolFallbackModuleFilenameTemplate? : DevtoolFallbackModuleFilenameTemplate ;
/ * *
* Filename template string of function for the sources array in a generated SourceMap .
* /
devtoolModuleFilenameTemplate? : 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 .
* /
devtoolNamespace? : DevtoolNamespace ;
2020-08-26 03:45:56 +08:00
/ * *
* List of chunk loading types enabled for use by entry points .
* /
enabledChunkLoadingTypes? : EnabledChunkLoadingTypes ;
2020-02-20 03:25:49 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* List of library types enabled for use by entry points .
2020-02-20 03:25:49 +08:00
* /
enabledLibraryTypes? : EnabledLibraryTypes ;
2020-09-09 15:23:01 +08:00
/ * *
* List of wasm loading types enabled for use by entry points .
* /
enabledWasmLoadingTypes? : EnabledWasmLoadingTypes ;
2020-09-09 22:37:53 +08:00
/ * *
* The abilities of the environment where the webpack generated code should run .
* /
environment? : Environment ;
2020-02-20 03:25:49 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* 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 .
2020-02-20 03:25:49 +08:00
* /
filename? : Filename ;
/ * *
2020-03-09 21:14:44 +08:00
* An expression which is used to address the global object / scope in runtime code .
2020-02-20 03:25:49 +08:00
* /
globalObject? : GlobalObject ;
/ * *
2020-03-09 21:14:44 +08:00
* Digest type used for the hash .
2020-02-20 03:25:49 +08:00
* /
hashDigest? : HashDigest ;
/ * *
2020-03-09 21:14:44 +08:00
* Number of chars which are used for the hash .
2020-02-20 03:25:49 +08:00
* /
hashDigestLength? : HashDigestLength ;
/ * *
2020-03-09 21:14:44 +08:00
* Algorithm used for generation the hash ( see node . js crypto package ) .
2020-02-20 03:25:49 +08:00
* /
hashFunction? : HashFunction ;
/ * *
2020-03-09 21:14:44 +08:00
* Any string which is added to the hash to salt it .
2020-02-20 03:25:49 +08:00
* /
hashSalt? : HashSalt ;
/ * *
* The filename of the Hot Update Chunks . They are inside the output . path directory .
* /
hotUpdateChunkFilename? : HotUpdateChunkFilename ;
/ * *
2020-08-25 15:16:49 +08:00
* The global variable used by webpack for loading of hot update chunks .
2020-02-20 03:25:49 +08:00
* /
2020-08-25 15:16:49 +08:00
hotUpdateGlobal? : HotUpdateGlobal ;
2020-02-20 03:25:49 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* The filename of the Hot Update Main File . It is inside the 'output.path' directory .
2020-02-20 03:25:49 +08:00
* /
hotUpdateMainFilename? : HotUpdateMainFilename ;
/ * *
2020-03-13 17:03:17 +08:00
* Wrap javascript code into IIFE ' s to avoid leaking into global scope .
2020-02-20 03:25:49 +08:00
* /
iife? : Iife ;
2020-05-15 22:24:11 +08:00
/ * *
* The name of the native import ( ) function ( can be exchanged for a polyfill ) .
* /
importFunctionName? : ImportFunctionName ;
2020-09-18 16:55:37 +08:00
/ * *
* The name of the native import . meta object ( can be exchanged for a polyfill ) .
* /
importMetaName? : ImportMetaName ;
2020-02-20 03:25:49 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for library .
2020-02-20 03:25:49 +08:00
* /
library? : LibraryOptions ;
/ * *
* Output javascript files as module source type .
* /
module ? : OutputModule ;
/ * *
* The output directory as * * absolute path * * ( required ) .
* /
path? : Path ;
/ * *
* Include comments with information about the module s.
* /
pathinfo? : Pathinfo ;
/ * *
* The ` publicPath ` specifies the public URL address of the output files when referenced in a browser .
* /
publicPath? : PublicPath ;
2020-06-25 04:05:21 +08:00
/ * *
* This option enables loading async chunks via a custom script type , such as script type = "module" .
* /
scriptType? : ScriptType ;
2020-02-20 03:25:49 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* The filename of the SourceMaps for the JavaScript files . They are inside the 'output.path' directory .
2020-02-20 03:25:49 +08:00
* /
sourceMapFilename? : SourceMapFilename ;
/ * *
* Prefixes every line of the source in the bundle with this string .
* /
sourcePrefix? : SourcePrefix ;
/ * *
* Handles exceptions in module loading correctly at a performance cost .
* /
strictModuleExceptionHandling? : StrictModuleExceptionHandling ;
/ * *
* A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals .
* /
uniqueName? : UniqueName ;
2020-09-09 15:23:01 +08:00
/ * *
* 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 ) .
* /
wasmLoading? : WasmLoading ;
2020-02-20 03:25:49 +08:00
/ * *
2021-01-05 18:11:02 +08:00
* The filename of WebAssembly module s as relative path inside the 'output.path' directory .
2020-02-20 03:25:49 +08:00
* /
webassemblyModuleFilename? : WebassemblyModuleFilename ;
2020-09-08 00:02:14 +08:00
/ * *
* 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 ) .
* /
workerChunkLoading? : ChunkLoading ;
2020-09-09 15:23:01 +08:00
/ * *
* 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 ) .
* /
workerWasmLoading? : WasmLoading ;
2020-02-20 03:25:49 +08:00
}
2020-02-17 17:27:46 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Normalized webpack options object .
2020-02-17 17:27:46 +08:00
* /
export interface WebpackOptionsNormalized {
2020-02-17 19:14:51 +08:00
/ * *
* Set the value of ` require.amd ` and ` define.amd ` . Or disable AMD support .
* /
2020-02-17 17:27:46 +08:00
amd? : Amd ;
2020-02-17 19:14:51 +08:00
/ * *
* Report the first error as a hard error instead of tolerating it .
* /
2020-02-17 17:27:46 +08:00
bail? : Bail ;
2020-02-17 19:14:51 +08:00
/ * *
* Cache generated module s and chunks to improve performance for multiple incremental builds .
* /
2020-03-21 21:01:38 +08:00
cache : CacheOptionsNormalized ;
2020-02-17 19:14:51 +08:00
/ * *
* The base directory ( absolute path ! ) for resolving the ` entry ` option . If ` output.pathinfo ` is set , the included pathinfo is shortened to this directory .
* /
2020-02-17 17:27:46 +08:00
context? : Context ;
2020-02-17 19:14:51 +08:00
/ * *
* References to other configurations to depend on .
* /
2020-02-17 17:27:46 +08:00
dependencies? : Dependencies ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for the webpack - dev - server .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
devServer? : DevServer ;
2020-02-17 19:14:51 +08:00
/ * *
* A developer tool to enhance debugging ( false | eval | [ inline - | hidden - | eval - ] [ nosources - ] [ cheap - [ module - ] ] source - map ) .
* /
2020-02-17 17:27:46 +08:00
devtool? : DevTool ;
2020-02-17 19:14:51 +08:00
/ * *
* The entry point ( s ) of the compilation .
* /
2020-02-17 17:27:46 +08:00
entry : EntryNormalized ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-13 17:03:17 +08:00
* Enables / Disables experiments ( experimental features with relax SemVer compatibility ) .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
experiments : Experiments ;
2020-02-17 19:14:51 +08:00
/ * *
* 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 ` .
* /
2020-02-17 17:27:46 +08:00
externals : Externals ;
2020-02-18 17:44:55 +08:00
/ * *
2020-09-09 21:16:53 +08:00
* Enable presets of externals for specific targets .
* /
externalsPresets : ExternalsPresets ;
/ * *
2020-03-09 21:14:44 +08:00
* Specifies the default type of externals ( 'amd*' , 'umd*' , 'system' and 'jsonp' depend on output . libraryTarget set to the same value ) .
2020-02-18 17:44:55 +08:00
* /
externalsType? : ExternalsType ;
2020-09-21 04:08:38 +08:00
/ * *
* Ignore specific warnings .
* /
ignoreWarnings? : IgnoreWarningsNormalized ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for infrastructure level logging .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
infrastructureLogging : InfrastructureLogging ;
2020-02-17 19:14:51 +08:00
/ * *
* Custom values available in the loader context .
* /
2020-02-17 17:27:46 +08:00
loader? : Loader ;
2020-02-17 19:14:51 +08:00
/ * *
* Enable production optimizations or development hints .
* /
2020-02-17 17:27:46 +08:00
mode? : Mode ;
2020-02-17 19:14:51 +08:00
/ * *
* Options affecting the normal module s ( ` NormalModuleFactory ` ) .
* /
2020-03-21 21:01:38 +08:00
module : ModuleOptions ;
2020-02-17 19:14:51 +08:00
/ * *
* Name of the configuration . Used when loading multiple configurations .
* /
2020-02-17 17:27:46 +08:00
name? : Name ;
2020-02-17 19:14:51 +08:00
/ * *
* Include polyfills or mocks for various node stuff .
* /
2020-02-17 17:27:46 +08:00
node : Node ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Enables / Disables integrated optimizations .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
optimization : Optimization ;
2020-02-17 19:14:51 +08:00
/ * *
2020-02-20 03:25:49 +08:00
* Normalized options affecting the output of the compilation . ` output ` options tell webpack how to write the compiled files to disk .
2020-02-17 19:14:51 +08:00
* /
2020-02-20 03:25:49 +08:00
output : OutputNormalized ;
2020-02-17 19:14:51 +08:00
/ * *
* The number of parallel processed module s in the compilation .
* /
2020-02-17 17:27:46 +08:00
parallelism? : Parallelism ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Configuration for web performance recommendations .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
performance? : Performance ;
2020-02-17 19:14:51 +08:00
/ * *
* Add additional plugins to the compiler .
* /
2020-02-17 17:27:46 +08:00
plugins : Plugins ;
2020-02-17 19:14:51 +08:00
/ * *
* Capture timing information for each module .
* /
2020-02-17 17:27:46 +08:00
profile? : Profile ;
2020-02-17 19:14:51 +08:00
/ * *
* Store compiler state to a json file .
* /
2020-02-17 17:27:46 +08:00
recordsInputPath? : RecordsInputPath ;
2020-02-17 19:14:51 +08:00
/ * *
* Load compiler state from a json file .
* /
2020-02-17 17:27:46 +08:00
recordsOutputPath? : RecordsOutputPath ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for the resolver .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
resolve : Resolve ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for the resolver when resolving loaders .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
resolveLoader : ResolveLoader ;
2020-08-26 06:36:16 +08:00
/ * *
* Options affecting how file system snapshots are created and validated .
* /
snapshot : SnapshotOptions ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Stats options object or preset name .
2020-02-17 19:14:51 +08:00
* /
2020-03-21 21:01:38 +08:00
stats : StatsValue ;
2020-02-17 19:14:51 +08:00
/ * *
2020-09-10 16:42:29 +08:00
* Environment to build for . An array of environments to build for all of them when possible .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
target? : Target ;
2020-02-17 19:14:51 +08:00
/ * *
* Enter watch mode , which rebuilds on file change .
* /
2020-02-17 17:27:46 +08:00
watch? : Watch ;
2020-02-17 19:14:51 +08:00
/ * *
2020-03-09 21:14:44 +08:00
* Options for the watcher .
2020-02-17 19:14:51 +08:00
* /
2020-02-17 17:27:46 +08:00
watchOptions : WatchOptions ;
}