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
contextInfo:
<ModuleFactoryCreateDataContextInfo>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
)} 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.
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:
<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.
web:
<boolean>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
)}
Type:
{((data: ExternalItemFunctionData, callback: (err?: null | Error, result?: string | boolean | string[] | { [index: string]: any }) => void) => void) | ((data: ExternalItemFunctionData) => Promise
)}
Attributes
callback:
{(err?: null | Error, result?: string | boolean | string[] | { [index: string]: any }) => void}
Returns:
<void>Attributes
options:
<ResolveOptions>Returns:
{((context: string, request: string, callback: (err?: null | Error, result?: string | false, resolveRequest?: ResolveRequest) => void) => void) | ((context: string, request: string) => Promise
)}
Attributes
Attributes
Attributes
Returns:
{Promise
}
Type:
{string | boolean | string[] | { [index: string]: any }}
Type:
{string | RegExp | ExternalItemObjectKnown & ExternalItemObjectUnknown | ((data: ExternalItemFunctionData, callback: (err?: null | Error, result?: string | boolean | string[] | { [index: string]: any }) => void) => void) | ((data: ExternalItemFunctionData) => Promise
) | 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">