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
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||||
Author Tobias Koppers @sokra
|
Author Tobias Koppers @sokra
|
||||||
*/
|
*/
|
||||||
var ModuleDependency = require("./ModuleDependency");
|
"use strict";
|
||||||
|
const ModuleDependency = require("./ModuleDependency");
|
||||||
|
|
||||||
function PrefetchDependency(request) {
|
class PrefetchDependency extends ModuleDependency {
|
||||||
ModuleDependency.call(this, request);
|
constructor(request) {
|
||||||
|
super(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
get type() {
|
||||||
|
return "prefetch";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
module.exports = PrefetchDependency;
|
|
||||||
|
|
||||||
PrefetchDependency.prototype = Object.create(ModuleDependency.prototype);
|
module.exports = PrefetchDependency;
|
||||||
PrefetchDependency.prototype.constructor = PrefetchDependency;
|
|
||||||
PrefetchDependency.prototype.type = "prefetch";
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue