diff --git a/types/webpack/index.d.ts b/types/webpack/index.d.ts index a228afc242..664439523b 100644 --- a/types/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -117,7 +117,7 @@ declare namespace webpack { [name: string]: string | string[]; } - type EntryFunc = () => (string | string[] | Promise); + type EntryFunc = () => (string | string[] | Entry | Promise); interface DevtoolModuleFilenameTemplateInfo { identifier: string; diff --git a/types/webpack/webpack-tests.ts b/types/webpack/webpack-tests.ts index 2f75d11b31..16234d422a 100644 --- a/types/webpack/webpack-tests.ts +++ b/types/webpack/webpack-tests.ts @@ -55,6 +55,14 @@ configuration = { entry: () => ['./demo', './demo2'] }; +configuration = { + entry: () => ({ + p1: "./page1", + p2: "./page2", + p3: "./page3" + }) +}; + configuration = { entry: () => new Promise((resolve) => resolve('./demo')) }; @@ -63,6 +71,14 @@ configuration = { entry: () => new Promise((resolve) => resolve(['./demo', './demo2'])) }; +configuration = { + entry: () => new Promise((resolve) => resolve({ + p1: "./page1", + p2: "./page2", + p3: "./page3" + })) +}; + // // https://webpack.github.io/docs/optimization.html //