From 3eb9905ed7aa7ffb722981a95d340906db69e01c Mon Sep 17 00:00:00 2001 From: Cameron Martin Date: Wed, 16 Jan 2019 11:41:14 +0000 Subject: [PATCH] [webpack]: Added types for SingleEntryPlugin. See https://github.com/webpack/webpack/blob/6f722436697ffa946d4c5c69d25e6cbba4aa0796/lib/SingleEntryPlugin.js --- types/webpack/index.d.ts | 4 ++++ types/webpack/webpack-tests.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/types/webpack/index.d.ts b/types/webpack/index.d.ts index 469fd67076..000175492a 100644 --- a/types/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -1452,6 +1452,10 @@ declare namespace webpack { constructor(paths: Array); } + class SingleEntryPlugin extends Plugin { + constructor(context: string, entry: string, name: string); + } + namespace optimize { /** @deprecated use config.optimization.concatenateModules */ class ModuleConcatenationPlugin extends Plugin { } diff --git a/types/webpack/webpack-tests.ts b/types/webpack/webpack-tests.ts index 49b827d934..fb0a083a29 100644 --- a/types/webpack/webpack-tests.ts +++ b/types/webpack/webpack-tests.ts @@ -446,6 +446,11 @@ plugin = new webpack.HashedModuleIdsPlugin({ hashDigest: 'hex', hashDigestLength: 20 }); +plugin = new webpack.SingleEntryPlugin( + '/home', + './main.js', + 'main' +); // // http://webpack.github.io/docs/node.js-api.html