nav tabs on admin dashboard
This commit is contained in:
34
node_modules/webpack/lib/FlagInitialModulesAsUsedPlugin.js
generated
vendored
34
node_modules/webpack/lib/FlagInitialModulesAsUsedPlugin.js
generated
vendored
@@ -5,19 +5,31 @@
|
||||
"use strict";
|
||||
|
||||
class FlagInitialModulesAsUsedPlugin {
|
||||
constructor(explanation) {
|
||||
this.explanation = explanation;
|
||||
}
|
||||
|
||||
apply(compiler) {
|
||||
compiler.plugin("compilation", (compilation) => {
|
||||
compilation.plugin("after-optimize-chunks", (chunks) => {
|
||||
chunks.forEach((chunk) => {
|
||||
if(!chunk.isInitial()) {
|
||||
return;
|
||||
compiler.hooks.compilation.tap(
|
||||
"FlagInitialModulesAsUsedPlugin",
|
||||
compilation => {
|
||||
compilation.hooks.afterOptimizeChunks.tap(
|
||||
"FlagInitialModulesAsUsedPlugin",
|
||||
chunks => {
|
||||
for (const chunk of chunks) {
|
||||
if (!chunk.isOnlyInitial()) {
|
||||
return;
|
||||
}
|
||||
for (const module of chunk.modulesIterable) {
|
||||
module.used = true;
|
||||
module.usedExports = true;
|
||||
module.addReason(null, null, this.explanation);
|
||||
}
|
||||
}
|
||||
}
|
||||
chunk.forEachModule((module) => {
|
||||
module.usedExports = true;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user