Skip to content

Commit 771c6b2

Browse files
shubhekshaTheLarkInn
authored andcommitted
refactor(ES6): upgrade DedupePlugin to ES6 (webpack#3749)
1 parent d1361ae commit 771c6b2

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

‎lib/optimize/DedupePlugin.js‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
MIT License http://www.opensource.org/licenses/mit-license.php
33
Author Tobias Koppers @sokra
44
*/
5-
function DedupePlugin() {}
6-
module.exports = DedupePlugin;
5+
"use strict";
6+
7+
class DedupePlugin {
8+
apply(compiler) {
9+
compiler.plugin("compilation", (compilation) => {
10+
compilation.warnings.push(new Error("DedupePlugin: This plugin was removed from webpack. remove it from configuration."));
11+
});
12+
}
13+
}
714

8-
DedupePlugin.prototype.apply = function(compiler) {
9-
compiler.plugin("compilation", function(compilation) {
10-
compilation.warnings.push(new Error("DedupePlugin: This plugin was removed from webpack. remove it from configuration."));
11-
});
12-
};
15+
module.exports = DedupePlugin;

0 commit comments

Comments
 (0)