mirror of https://github.com/webpack/webpack.git
refactor PrefetchDependency to es6 (#3810)
This commit is contained in:
parent
c38e3ef832
commit
d534603af3
|
|
@ -2,13 +2,17 @@
|
|||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
var ModuleDependency = require("./ModuleDependency");
|
||||
"use strict";
|
||||
const ModuleDependency = require("./ModuleDependency");
|
||||
|
||||
function PrefetchDependency(request) {
|
||||
ModuleDependency.call(this, request);
|
||||
class PrefetchDependency extends ModuleDependency {
|
||||
constructor(request) {
|
||||
super(request);
|
||||
}
|
||||
|
||||
get type() {
|
||||
return "prefetch";
|
||||
}
|
||||
}
|
||||
module.exports = PrefetchDependency;
|
||||
|
||||
PrefetchDependency.prototype = Object.create(ModuleDependency.prototype);
|
||||
PrefetchDependency.prototype.constructor = PrefetchDependency;
|
||||
PrefetchDependency.prototype.type = "prefetch";
|
||||
module.exports = PrefetchDependency;
|
||||
|
|
|
|||
Loading…
Reference in New Issue