These types are not exported by webpack, but they are available to TypeScript consumers.
Attributes
context:
stringthe directory in which the request is placed
contextInfo:
ModuleFactoryCreateDataContextInfocontextual information
dependencyType:
stringthe 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:
stringthe 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.
[index: {string}]ExternalItemValue
Enable presets of externals for specific targets.
Attributes
electron:
booleanTreat 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:
booleanTreat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.
electronPreload:
booleanTreat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
electronRenderer:
booleanTreat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
node:
booleanTreat node.js built-in modules like fs, path or vm as external and load them via require() when used.
nwjs:
booleanTreat NW.js legacy nw.gui module as external and load it via require() when used.
web:
booleanTreat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).
webAsync:
booleanTreat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution).
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
Attributes
Attributes
Attributes
Attributes
Returns:
Promise<ExternalItemValue>Type:
string | RegExp | ExternalItemObjectKnown & ExternalItemObjectUnknown | ((data: ExternalItemFunctionData, callback: (err?: null | Error, result?: string | boolean | string[] | { [index: string]: any }) => void) => void) | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>) | ExternalItem[]Type:
ExternalsPresets & { electron: NonNullable<undefined | boolean>; electronMain: NonNullable<undefined | boolean>; electronPreload: NonNullable<undefined | boolean>; electronRenderer: NonNullable<undefined | boolean>; node: NonNullable<undefined | boolean>; nwjs: NonNullable<undefined | boolean>; web: NonNullable<undefined | boolean> }Attributes
electron:
NonNullable<undefined | boolean>electronMain:
NonNullable<undefined | boolean>electronPreload:
NonNullable<undefined | boolean>electronRenderer:
NonNullable<undefined | boolean>node:
NonNullable<undefined | boolean>nwjs:
NonNullable<undefined | boolean>web:
NonNullable<undefined | boolean>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"