These types are not exported by webpack, but they are available to TypeScript consumers.
Advanced options for cleaning assets.
CompiledAliasOption[]Map<number, CompiledAliasOption[]>booleanbooleanOptions object as provided by the user.
require.amd
and
define.amd
. Or disable AMD support.booleanboolean | FileCacheOptions | MemoryCacheOptionsstringentry
option. If
output.pathinfo
is set, the included pathinfo is shortened to this directory.string[]string | false | { type: "css" | "javascript" | "all"; use: RawDevTool }[]boolean | DotenvPluginOptionsstring | string[] | EntryObject | (() => string | string[] | EntryObject | Promise<EntryStatic>)Experimentsstring | RegExp | ExternalItemObjectKnown & ExternalItemObjectUnknown | ((data: ExternalItemFunctionData, callback: (err?: Error | null, result?: string | boolean | string[] | { [index: string]: any }) => void) => void) | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>) | ExternalItem[]output.libraryTarget
.ExternalsPresets"asset" | "module" | "asset-url" | "css-import" | "global" | "import" | "promise" | "this" | "var" | "commonjs" | "script" | "jsonp" | "assign" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "module-import" | "node-commonjs" | "css-url"(RegExp | { file?: RegExp; message?: RegExp; module?: RegExp } | ((warning: Error, compilation: Compilation) => boolean))[]InfrastructureLoggingLoader"development" | "none" | "production"ModuleOptionsNormalModuleFactory
).stringfalse | NodeOptionsOptimizationOutputoutput
options tell webpack how to write the compiled files to disk.numberfalse | PerformanceOptions(false | "" | 0 | WebpackPluginInstance | ((this: Compiler, compiler: Compiler) => void) | null | undefined)[]booleanstring | falsestring | falsestring | falserecordsPath
is used for
recordsInputPath
and
recordsOutputPath
if they left undefined.ResolveOptionsResolveOptionsSnapshotOptionsWebpackOptionsboolean | "none" | "verbose" | "summary" | "errors-only" | "errors-warnings" | "minimal" | "normal" | "detailed" | StatsOptionsbooleanbooleanWatchOptionsstringstringstring | nullRegExp | nullRawChunkGroupOptionsRegExp | nullstring | nullContextModeboolean | "strict"0 | 2 | 1booleanstring[][] | nullfalse | RegExp | nullstringGenerator options for css modules.
Parser options for css modules.
"stylesheet" | "block-contents"style
attribute)."link" | "text" | "css-style-sheet" | "style"boolean@import
at-rules handling.booleanbooleanurl()
/
image-set()
/
src()
/
image()
functions handling.Options for Dotenv plugin.
string | falsestring[]No generator options are supported for this module type.
No parser options are supported for this module type.
[index: {string}]any
Generator options for html modules.
boolean | "inline".html
output file alongside the module's JavaScript export.
true
always emits the file;
false
never does;
"inline"
exposes the processed HTML for inline write-back (e.g.
<iframe srcdoc>
) without emitting a standalone file. When unset, extraction defaults to
true
for HTML modules used as compilation entries (HTML entry points) and
false
for HTML modules imported from JavaScript. Filenames follow
output.htmlFilename
/
output.htmlChunkFilename
.Parser options for html modules.
boolean | ("..." | { attribute: string; filter?: (attributes: Map<string, string>, value: string) => boolean; tag?: string; type: "src" | "script" | "stylesheet" | "css-url" | "srcset" | "script-module" | "stylesheet-style" | "stylesheet-style-attribute" | "srcdoc" })[]<img src>
,
<link href>
,
<script src>
) as webpack dependencies.
true
(default) uses the built-in source list;
false
disables extraction entirely so attributes are left untouched and
<script src>
/
<link rel="modulepreload">
/
<link rel="stylesheet">
no longer become compilation entries; an array lets you customize which
tag
/
attribute
pairs are treated as URLs and how they are bundled. Use the string
"..."
inside the array to inline the defaults. Inline
<script>
and
<style>
bodies are always processed. Use
webpackIgnore
comments or
IgnorePlugin
to skip individual URLs.(source: string, context: HtmlTemplateContext) => string{ module, resource }
) and must return the html string to parse. Useful for compiling a templating language (Handlebars, EJS, Eta, …) to html so that URLs the template emits are still picked up as webpack dependencies. Runs synchronously.Options for building http resources.
string | falsebooleanstringstringbooleanParser options for javascript modules.
require.amd
and
define.amd
. Or disable AMD support.booleanbooleanbooleanbooleancreateRequire
from "module"" and evaluating createRequire().booleanfalse | "auto" | "low" | "high""eager" | "weak" | "lazy" | "lazy-once"booleanfalse | "error" | "warn" | "auto"booleanbooleanstringbooleanbooleanfalse | "error" | "warn" | "auto"boolean | "preserve-unknown"booleanfalse | NodeOptions"strict" | "non-strict"(code: string, options: ParseOptions) => ParseResultstring[]false | "error" | "warn" | "auto"booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanstringboolean | "relative"booleanbooleanRegExpGenerator options for json modules.
booleanJSON.parse
when the JSON string is longer than 20 characters.Parser options for JSON modules.
numberexportInfo
.boolean(input: string) => string | number | boolean | Buffer<ArrayBufferLike> | JsonObjectFs | JsonValueFs[] | nullOptions for the default backend.
stringnumber | ListenOptions | ((server: ServerLazyCompilationBackend) => void)"http" | "https"ServerOptions<typeof IncomingMessage, typeof ServerResponse> | ServerOptions<typeof IncomingMessage, typeof ServerResponse> | (() => ServerLazyCompilationBackend)Options for compiling entrypoints and import()s only when they are accessed.
((compiler: Compiler, callback: (err: Error | null, backendApi?: BackendApi) => void) => void) | ((compiler: Compiler) => Promise<BackendApi>) | LazyCompilationDefaultBackendOptionsbooleanboolean[index: {string}]any
numberOptions object for node compatibility features.
boolean | "warn-mock" | "mock" | "node-module" | "eval-only"boolean | "warn-mock" | "mock" | "node-module" | "eval-only"boolean | "warn"Options for the generated HTML files.
"defer" | "auto" | "blocking"<script>
tags load.
auto
(default) emits a module script for ES module output and
defer
otherwise;
defer
forces a deferred script;
blocking
emits a plain blocking script.[index: {string}]any
Configuration object for web performance recommendations.
false | "error" | "warning"numbernumberReturns location of targetPath relative to rootPath.
Options affecting how file system snapshots are created and validated.
string | false | TemplatePathFn<PathData> | nullbooleanbooleanstring | ((context: ModuleFilenameTemplateContext) => string)stringstring | false | nullbooleanstring | ((context: ModuleFilenameTemplateContext) => string)stringbooleanstringstringReturns location of targetPath relative to rootPath.
Returns location of targetPath relative to rootPath.
Options for the watcher.
string | false | { type: "css" | "javascript" | "all"; use: RawDevTool }[]Normalized webpack options object.
require.amd
and
define.amd
. Or disable AMD support.booleanCacheOptionsNormalizedstringentry
option. If
output.pathinfo
is set, the included pathinfo is shortened to this directory.string[]string | false | { type: "css" | "javascript" | "all"; use: RawDevTool }[]boolean | DotenvPluginOptionsEntryNormalizedExperimentsNormalizedExternalsoutput.libraryTarget
.ExternalsPresets"asset" | "module" | "asset-url" | "css-import" | "global" | "import" | "promise" | "this" | "var" | "commonjs" | "script" | "jsonp" | "assign" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "module-import" | "node-commonjs" | "css-url"((warning: Error, compilation: Compilation) => boolean)[]InfrastructureLoggingLoader"development" | "none" | "production"ModuleOptionsNormalizedNormalModuleFactory
).stringNodeWebpackOptionsOptimizationNormalizedOutputNormalizedoutput
options tell webpack how to write the compiled files to disk.numberfalse | PerformanceOptions(WebpackPluginInstance | ((this: Compiler, compiler: Compiler) => void))[]booleanstring | falsestring | falseResolveOptionsResolveOptionsSnapshotOptionsWebpackOptionsStatsValuebooleanbooleanWatchOptions(options: Partial<ResolveOptionsWithDependencyType>) => ResolverWithOptionsReadonlyArray<Configuration> & MultiCompilerOptionsfalse | NodeOptionsStreamOptions & { end?: number; fs?: null | CreateReadStreamFSImplementation }numbernull | CreateReadStreamFSImplementationWebpackOptionsNormalized & { context: string } & { infrastructureLogging: InfrastructureLoggingNormalizedWithDefaults } & { target: NonNullable<undefined | string | false | string[]> } & { output: OutputNormalizedWithDefaults } & { optimization: OptimizationNormalizedWithDefaults } & { devtool: NonNullable<undefined | string | false | { type: "css" | "all" | "javascript"; use: RawDevTool }[]> } & { stats: NonNullable<StatsValue> } & { node: NonNullable<NodeWebpackOptions> } & { profile: NonNullable<undefined | boolean> } & { parallelism: number } & { snapshot: SnapshotNormalizedWithDefaults } & { externalsPresets: ExternalsPresetsNormalizedWithDefaults } & { externalsType: NonNullable<undefined | "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"> } & { watch: NonNullable<undefined | boolean> } & { performance: NonNullable<undefined | false | PerformanceOptions> } & { recordsInputPath: NonNullable<undefined | string | false> } & { recordsOutputPath: NonNullable<undefined | string | false> } & { dotenv: NonNullable<undefined | boolean | DotenvPluginOptions> }stringInfrastructureLoggingNormalizedWithDefaultsNonNullable<undefined | string | false | string[]>OutputNormalizedWithDefaultsOptimizationNormalizedWithDefaultsNonNullable<undefined | string | false | { type: "css" | "all" | "javascript"; use: RawDevTool }[]>NonNullable<StatsValue>NonNullable<undefined | boolean>numberSnapshotNormalizedWithDefaultsExternalsPresetsNormalizedWithDefaultsNonNullable<undefined | "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">NonNullable<undefined | boolean>NonNullable<undefined | false | PerformanceOptions>NonNullable<undefined | string | false>NonNullable<undefined | string | false>NonNullable<undefined | boolean | DotenvPluginOptions>StreamOptions & { flush?: boolean; fs?: null | CreateWriteStreamFSImplementation }booleannull | CreateWriteStreamFSImplementation