Skip to content

Commit fe86449

Browse files
timseTheLarkInn
authored andcommitted
refactor of DelegatedSourceDependency to es6 (webpack#3784)
1 parent 987286e commit fe86449

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

lib/dependencies/DelegatedSourceDependency.js

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

7-
function DelegatedSourceDependency(request) {
8-
ModuleDependency.call(this, request);
8+
class DelegatedSourceDependency extends ModuleDependency {
9+
constructor(request) {
10+
super(request);
11+
}
12+
13+
get type() {
14+
return "delegated source";
15+
}
916
}
10-
module.exports = DelegatedSourceDependency;
1117

12-
DelegatedSourceDependency.prototype = Object.create(ModuleDependency.prototype);
13-
DelegatedSourceDependency.prototype.constructor = DelegatedSourceDependency;
14-
DelegatedSourceDependency.prototype.type = "delegated source";
18+
module.exports = DelegatedSourceDependency;

0 commit comments

Comments
 (0)