nav tabs on admin dashboard
This commit is contained in:
26
node_modules/webpack/lib/PrefetchPlugin.js
generated
vendored
26
node_modules/webpack/lib/PrefetchPlugin.js
generated
vendored
@@ -6,9 +6,8 @@
|
||||
const PrefetchDependency = require("./dependencies/PrefetchDependency");
|
||||
|
||||
class PrefetchPlugin {
|
||||
|
||||
constructor(context, request) {
|
||||
if(!request) {
|
||||
if (!request) {
|
||||
this.request = context;
|
||||
} else {
|
||||
this.context = context;
|
||||
@@ -17,15 +16,22 @@ class PrefetchPlugin {
|
||||
}
|
||||
|
||||
apply(compiler) {
|
||||
compiler.plugin("compilation", (compilation, params) => {
|
||||
const normalModuleFactory = params.normalModuleFactory;
|
||||
|
||||
compilation.dependencyFactories.set(PrefetchDependency, normalModuleFactory);
|
||||
});
|
||||
compiler.plugin("make", (compilation, callback) => {
|
||||
compilation.prefetch(this.context || compiler.context, new PrefetchDependency(this.request), callback);
|
||||
compiler.hooks.compilation.tap(
|
||||
"PrefetchPlugin",
|
||||
(compilation, { normalModuleFactory }) => {
|
||||
compilation.dependencyFactories.set(
|
||||
PrefetchDependency,
|
||||
normalModuleFactory
|
||||
);
|
||||
}
|
||||
);
|
||||
compiler.hooks.make.tapAsync("PrefetchPlugin", (compilation, callback) => {
|
||||
compilation.prefetch(
|
||||
this.context || compiler.context,
|
||||
new PrefetchDependency(this.request),
|
||||
callback
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
module.exports = PrefetchPlugin;
|
||||
|
||||
Reference in New Issue
Block a user