diff --git a/types/webpack-chain/index.d.ts b/types/webpack-chain/index.d.ts index 1a18737bc2..ecf995cf59 100644 --- a/types/webpack-chain/index.d.ts +++ b/types/webpack-chain/index.d.ts @@ -221,7 +221,11 @@ declare namespace Config { } interface RuntimeChunk { - name: string | Function; + name: string | RuntimeChunkFunction; + } + + interface RuntimeChunkFunction { + (entryPoint: Config.EntryPoint): string; } interface SplitChunksOptions { [name: string]: any; } diff --git a/types/webpack-chain/webpack-chain-tests.ts b/types/webpack-chain/webpack-chain-tests.ts index 387162fb07..f9a075cc71 100644 --- a/types/webpack-chain/webpack-chain-tests.ts +++ b/types/webpack-chain/webpack-chain-tests.ts @@ -166,6 +166,7 @@ config .removeAvailableModules(true) .removeEmptyChunks(true) .runtimeChunk("single") + .runtimeChunk({ name: ({}) => "hello" }) .sideEffects(true) .splitChunks({}) .usedExports(true)