On this page

These types are not exported by webpack, but they are available to TypeScript consumers.

Attributes
context:string
the directory in which the request is placed
contextual information
dependencyType:string
the category of the referencing dependency
getResolve:(options?: ResolveOptions) => ((context: string, request: string, callback: (err?: Error | null, result?: string | false, resolveRequest?: ResolveRequest) => void) => void) | ((context: string, request: string) => Promise<string>)
get a resolve function with the current resolver options
request:string
the request as written by the user in the require/import expression/statement

If an dependency matches exactly a property of the object, the property value is used as dependency.

Attributes
byLayer:{ [index: string]: ExternalItem } | ((layer: string | null) => ExternalItem)
Specify externals depending on the layer.

If an dependency matches exactly a property of the object, the property value is used as dependency.


Enable presets of externals for specific targets.

Attributes
electron:boolean
Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used.
electronMain:boolean
Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.
electronPreload:boolean
Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
electronRenderer:boolean
Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
node:boolean
Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.
nwjs:boolean
Treat NW.js legacy nw.gui module as external and load it via require() when used.
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).
webAsync: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).

Type:string | RegExp | ExternalItemObjectKnown & ExternalItemObjectUnknown | ((data: ExternalItemFunctionData, callback: (err?: null | Error, result?: string | boolean | string[] | { [index: string]: any }) => void) => void) | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)

Type:((data: ExternalItemFunctionData, callback: (err?: null | Error, result?: string | boolean | string[] | { [index: string]: any }) => void) => void) | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)

Attributes
callback:(err?: null | Error, result?: string | boolean | string[] | { [index: string]: any }) => void
Returns:void

Attributes
Returns:((context: string, request: string, callback: (err?: null | Error, result?: string | false, resolveRequest?: ResolveRequest) => void) => void) | ((context: string, request: string) => Promise<string>)

Attributes
context:string
request:string
callback:(err?: null | Error, result?: string | false, resolveRequest?: ResolveRequest) => void
Returns:void

Attributes
context:string
request:string
Returns:Promise<string>

Attributes

Type:string | boolean | string[] | { [index: string]: any }


Attributes

Type:"import" | "var" | "module" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "asset" | "asset-url" | "css-import" | "css-url"