nav tabs on admin dashboard
This commit is contained in:
36
node_modules/webpack/lib/WarnCaseSensitiveModulesPlugin.js
generated
vendored
36
node_modules/webpack/lib/WarnCaseSensitiveModulesPlugin.js
generated
vendored
@@ -8,23 +8,29 @@ const CaseSensitiveModulesWarning = require("./CaseSensitiveModulesWarning");
|
||||
|
||||
class WarnCaseSensitiveModulesPlugin {
|
||||
apply(compiler) {
|
||||
compiler.plugin("compilation", compilation => {
|
||||
compilation.plugin("seal", () => {
|
||||
const moduleWithoutCase = Object.create(null);
|
||||
compilation.modules.forEach(module => {
|
||||
const identifier = module.identifier().toLowerCase();
|
||||
if(moduleWithoutCase[identifier]) {
|
||||
moduleWithoutCase[identifier].push(module);
|
||||
} else {
|
||||
moduleWithoutCase[identifier] = [module];
|
||||
compiler.hooks.compilation.tap(
|
||||
"WarnCaseSensitiveModulesPlugin",
|
||||
compilation => {
|
||||
compilation.hooks.seal.tap("WarnCaseSensitiveModulesPlugin", () => {
|
||||
const moduleWithoutCase = new Map();
|
||||
for (const module of compilation.modules) {
|
||||
const identifier = module.identifier().toLowerCase();
|
||||
const array = moduleWithoutCase.get(identifier);
|
||||
if (array) {
|
||||
array.push(module);
|
||||
} else {
|
||||
moduleWithoutCase.set(identifier, [module]);
|
||||
}
|
||||
}
|
||||
for (const pair of moduleWithoutCase) {
|
||||
const array = pair[1];
|
||||
if (array.length > 1) {
|
||||
compilation.warnings.push(new CaseSensitiveModulesWarning(array));
|
||||
}
|
||||
}
|
||||
});
|
||||
Object.keys(moduleWithoutCase).forEach(key => {
|
||||
if(moduleWithoutCase[key].length > 1)
|
||||
compilation.warnings.push(new CaseSensitiveModulesWarning(moduleWithoutCase[key]));
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user