mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-29 17:51:46 +00:00
Add optimization class to webpack-chain typings
This commit is contained in:
Vendored
+28
@@ -47,6 +47,7 @@ declare class Config extends __Config.ChainedMap<void> {
|
||||
module: Config.Module;
|
||||
node: Config.ChainedMap<this>;
|
||||
output: Config.Output;
|
||||
optimization: Config.Optimization;
|
||||
performance: Config.Performance;
|
||||
plugins: Config.Plugins<this>;
|
||||
resolve: Config.Resolve;
|
||||
@@ -198,6 +199,33 @@ declare namespace Config {
|
||||
post(): this;
|
||||
}
|
||||
|
||||
class Optimization extends ChainedMap<Config> {
|
||||
concatenateModules(value: boolean): this;
|
||||
flagIncludedChunks(value: boolean): this;
|
||||
mergeDuplicateChunks(value: boolean): this;
|
||||
minimize(value: boolean): this;
|
||||
minimizer(value: webpack.Plugin[]): this;
|
||||
namedChunks(value: boolean): this;
|
||||
namedModules(value: boolean): this;
|
||||
nodeEnv(value: boolean | string): this;
|
||||
noEmitOnErrors(value: boolean): this;
|
||||
occurrenceOrder(value: boolean): this;
|
||||
portableRecords(value: boolean): this;
|
||||
providedExports(value: boolean): this;
|
||||
removeAvailableModules(value: boolean): this;
|
||||
removeEmptyChunks(value: boolean): this;
|
||||
runtimeChunk(value: boolean | "single" | "multiple" | RuntimeChunk): this;
|
||||
sideEffects(value: boolean): this;
|
||||
splitChunks(value: SplitChunksOptions): this;
|
||||
usedExports(value: boolean): this;
|
||||
}
|
||||
|
||||
interface RuntimeChunk {
|
||||
name: string | Function;
|
||||
}
|
||||
|
||||
interface SplitChunksOptions { [name: string]: any; }
|
||||
|
||||
interface LoaderOptions { [name: string]: any; }
|
||||
|
||||
class Use extends ChainedMap<Rule> {
|
||||
|
||||
@@ -150,6 +150,27 @@ config
|
||||
.umdNamedDefine(true)
|
||||
.end()
|
||||
|
||||
.optimization
|
||||
.concatenateModules(true)
|
||||
.flagIncludedChunks(true)
|
||||
.mergeDuplicateChunks(true)
|
||||
.minimize(true)
|
||||
.minimizer([])
|
||||
.namedChunks(true)
|
||||
.namedModules(true)
|
||||
.nodeEnv(true)
|
||||
.noEmitOnErrors(true)
|
||||
.occurrenceOrder(true)
|
||||
.portableRecords(true)
|
||||
.providedExports(true)
|
||||
.removeAvailableModules(true)
|
||||
.removeEmptyChunks(true)
|
||||
.runtimeChunk("single")
|
||||
.sideEffects(true)
|
||||
.splitChunks({})
|
||||
.usedExports(true)
|
||||
.end()
|
||||
|
||||
.performance
|
||||
.hints(true)
|
||||
.hints('warning')
|
||||
|
||||
Reference in New Issue
Block a user