mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
Merge pull request #28138 from FranklinWhale/webpack-entryfunc
[@types/webpack] EntryFunc may return Entry or Promise<Entry>
This commit is contained in:
Vendored
+1
-1
@@ -117,7 +117,7 @@ declare namespace webpack {
|
||||
[name: string]: string | string[];
|
||||
}
|
||||
|
||||
type EntryFunc = () => (string | string[] | Promise<string | string[]>);
|
||||
type EntryFunc = () => (string | string[] | Entry | Promise<string | string[] | Entry>);
|
||||
|
||||
interface DevtoolModuleFilenameTemplateInfo {
|
||||
identifier: string;
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user