mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 02:57:24 +08:00
chore: remove overloaded CommonsChunkPlugin constructor
d7384e2f6a/lib/optimize/CommonsChunkPlugin.js (L10-L25)
This commit is contained in:
@@ -58,7 +58,10 @@ configuration = {
|
||||
configuration = {
|
||||
// ...
|
||||
plugins: [
|
||||
new optimize.CommonsChunkPlugin("commons", "commons.js"),
|
||||
new optimize.CommonsChunkPlugin({
|
||||
name: "commons",
|
||||
filename: "commons.js",
|
||||
}),
|
||||
new ExtractTextPlugin("[name].css")
|
||||
]
|
||||
};
|
||||
|
||||
1
webpack/index.d.ts
vendored
1
webpack/index.d.ts
vendored
@@ -1002,7 +1002,6 @@ declare namespace webpack {
|
||||
new (options?: UglifyPluginOptions): Plugin;
|
||||
}
|
||||
interface CommonsChunkPluginStatic {
|
||||
new (chunkName: string, filenames?: string | string[]): Plugin;
|
||||
new (options?: any): Plugin;
|
||||
}
|
||||
interface AggressiveMergingPluginStatic {
|
||||
|
||||
@@ -62,7 +62,10 @@ configuration = {
|
||||
filename: "bundle.js"
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.CommonsChunkPlugin(/* chunkName= */"vendor", /* filename= */"vendor.bundle.js")
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: "vendor",
|
||||
filename: "vendor.bundle.js",
|
||||
}),
|
||||
]
|
||||
};
|
||||
|
||||
@@ -126,10 +129,6 @@ configuration = {
|
||||
output: {
|
||||
filename: "[name].js"
|
||||
},
|
||||
plugins: [
|
||||
new CommonsChunkPlugin("admin-commons.js", ["ap1", "ap2"]),
|
||||
new CommonsChunkPlugin("commons.js", ["p1", "p2", "admin-commons.js"])
|
||||
]
|
||||
};
|
||||
// <script>s required:
|
||||
// page1.html: commons.js, p1.js
|
||||
@@ -145,7 +144,10 @@ configuration = {
|
||||
commons: "./entry-for-the-commons-chunk"
|
||||
},
|
||||
plugins: [
|
||||
new CommonsChunkPlugin("commons", "commons.js")
|
||||
new CommonsChunkPlugin({
|
||||
name: "commons",
|
||||
filename: "commons.js",
|
||||
}),
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user