Skip to content

Commit 938072f

Browse files
BroccoTheLarkInn
authored andcommitted
refactor(es6): Upgrade NewWatchingPlugin to es6 (webpack#3620)
1 parent 6cad87f commit 938072f

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

‎lib/NewWatchingPlugin.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 NewWatchingPlugin() {}
6-
module.exports = NewWatchingPlugin;
5+
'use strict';
6+
7+
class NewWatchingPlugin {
8+
apply(compiler) {
9+
compiler.plugin("compilation", function(compilation) {
10+
compilation.warnings.push(new Error("The 'NewWatchingPlugin' is no longer necessary (now default)"));
11+
});
12+
}
13+
}
714

8-
NewWatchingPlugin.prototype.apply = function(compiler) {
9-
compiler.plugin("compilation", function(compilation) {
10-
compilation.warnings.push(new Error("The 'NewWatchingPlugin' is no longer necessary (now default)"));
11-
});
12-
};
15+
module.exports = NewWatchingPlugin;

0 commit comments

Comments
 (0)