[webpack]: Added types for SingleEntryPlugin.

See https://github.com/webpack/webpack/blob/6f722436697ffa946d4c5c69d25e6cbba4aa0796/lib/SingleEntryPlugin.js
This commit is contained in:
Cameron Martin
2019-01-16 11:41:36 +00:00
parent 5f012ded23
commit 3eb9905ed7
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -1452,6 +1452,10 @@ declare namespace webpack {
constructor(paths: Array<string | RegExp>);
}
class SingleEntryPlugin extends Plugin {
constructor(context: string, entry: string, name: string);
}
namespace optimize {
/** @deprecated use config.optimization.concatenateModules */
class ModuleConcatenationPlugin extends Plugin { }
+5
View File
@@ -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