nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions

View File

@@ -4,25 +4,31 @@
*/
"use strict";
const ConcatSource = require("webpack-sources").ConcatSource;
const Template = require("../Template");
const { ConcatSource } = require("webpack-sources");
class WebWorkerChunkTemplatePlugin {
apply(chunkTemplate) {
chunkTemplate.plugin("render", function(modules, chunk) {
const chunkCallbackName = this.outputOptions.chunkCallbackName || Template.toIdentifier("webpackChunk" + (this.outputOptions.library || ""));
const source = new ConcatSource();
source.add(`${chunkCallbackName}(${JSON.stringify(chunk.ids)},`);
source.add(modules);
source.add(")");
return source;
});
chunkTemplate.plugin("hash", function(hash) {
chunkTemplate.hooks.render.tap(
"WebWorkerChunkTemplatePlugin",
(modules, chunk) => {
const chunkCallbackName = chunkTemplate.outputOptions.chunkCallbackName;
const globalObject = chunkTemplate.outputOptions.globalObject;
const source = new ConcatSource();
source.add(
`${globalObject}[${JSON.stringify(
chunkCallbackName
)}](${JSON.stringify(chunk.ids)},`
);
source.add(modules);
source.add(")");
return source;
}
);
chunkTemplate.hooks.hash.tap("WebWorkerChunkTemplatePlugin", hash => {
hash.update("webworker");
hash.update("3");
hash.update(`${this.outputOptions.chunkCallbackName}`);
hash.update(`${this.outputOptions.library}`);
hash.update(`${chunkTemplate.outputOptions.chunkCallbackName}`);
hash.update(`${chunkTemplate.outputOptions.globalObject}`);
});
}
}