Skip to content

Commit 097d8aa

Browse files
ritikrishuTheLarkInn
authored andcommitted
refactor ImportDependenciesBlock to es6 syntax (webpack#3833)
1 parent af00214 commit 097d8aa

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

lib/dependencies/ImportDependenciesBlock.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
MIT License http://www.opensource.org/licenses/mit-license.php
33
Author Tobias Koppers @sokra
44
*/
5-
var AsyncDependenciesBlock = require("../AsyncDependenciesBlock");
6-
var ImportDependency = require("./ImportDependency");
5+
"use strict";
6+
const AsyncDependenciesBlock = require("../AsyncDependenciesBlock");
7+
const ImportDependency = require("./ImportDependency");
78

8-
function ImportDependenciesBlock(request, range, module, loc) {
9-
AsyncDependenciesBlock.call(this, null, module, loc);
10-
this.range = range;
11-
var dep = new ImportDependency(request, this);
12-
dep.loc = loc;
13-
this.addDependency(dep);
9+
module.exports = class ImportDependenciesBlock extends AsyncDependenciesBlock {
10+
constructor(request, range, module, loc) {
11+
super(null, module, loc);
12+
this.range = range;
13+
let dep = new ImportDependency(request, this);
14+
dep.loc = loc;
15+
this.addDependency(dep);
16+
}
1417
}
15-
module.exports = ImportDependenciesBlock;
16-
17-
ImportDependenciesBlock.prototype = Object.create(AsyncDependenciesBlock.prototype);
18-
ImportDependenciesBlock.prototype.constructor = ImportDependenciesBlock;

0 commit comments

Comments
 (0)