Skip to content

Commit 667ac58

Browse files
pimenovolegTheLarkInn
authored andcommitted
refactor(WebEnvironmentPlugin): upgrade to ES6 (webpack#3790)
1 parent cd01098 commit 667ac58

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

lib/web/WebEnvironmentPlugin.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22
MIT License http://www.opensource.org/licenses/mit-license.php
33
Author Tobias Koppers @sokra
44
*/
5-
function WebEnvironmentPlugin(inputFileSystem, outputFileSystem) {
6-
this.inputFileSystem = inputFileSystem;
7-
this.outputFileSystem = outputFileSystem;
5+
"use strict";
6+
7+
class WebEnvironmentPlugin {
8+
constructor(inputFileSystem, outputFileSystem) {
9+
this.inputFileSystem = inputFileSystem;
10+
this.outputFileSystem = outputFileSystem;
11+
}
12+
13+
apply(compiler) {
14+
compiler.outputFileSystem = this.outputFileSystem;
15+
}
816
}
17+
918
module.exports = WebEnvironmentPlugin;
10-
WebEnvironmentPlugin.prototype.apply = function(compiler) {
11-
compiler.outputFileSystem = this.outputFileSystem;
12-
};

0 commit comments

Comments
 (0)