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

@@ -3,26 +3,38 @@
Author Tobias Koppers @sokra
*/
"use strict";
const ConcatSource = require("webpack-sources").ConcatSource;
const Template = require("../Template");
const { ConcatSource } = require("webpack-sources");
class WebWorkerHotUpdateChunkTemplatePlugin {
apply(hotUpdateChunkTemplate) {
hotUpdateChunkTemplate.plugin("render", function(modulesSource, modules, removedModules, hash, id) {
const chunkCallbackName = this.outputOptions.hotUpdateFunction || Template.toIdentifier("webpackHotUpdate" + (this.outputOptions.library || ""));
const source = new ConcatSource();
source.add(chunkCallbackName + "(" + JSON.stringify(id) + ",");
source.add(modulesSource);
source.add(")");
return source;
});
hotUpdateChunkTemplate.plugin("hash", function(hash) {
hash.update("WebWorkerHotUpdateChunkTemplatePlugin");
hash.update("3");
hash.update(this.outputOptions.hotUpdateFunction + "");
hash.update(this.outputOptions.library + "");
});
hotUpdateChunkTemplate.hooks.render.tap(
"WebWorkerHotUpdateChunkTemplatePlugin",
(modulesSource, modules, removedModules, hash, id) => {
const hotUpdateFunction =
hotUpdateChunkTemplate.outputOptions.hotUpdateFunction;
const globalObject = hotUpdateChunkTemplate.outputOptions.globalObject;
const source = new ConcatSource();
source.add(
`${globalObject}[${JSON.stringify(
hotUpdateFunction
)}](${JSON.stringify(id)},`
);
source.add(modulesSource);
source.add(")");
return source;
}
);
hotUpdateChunkTemplate.hooks.hash.tap(
"WebWorkerHotUpdateChunkTemplatePlugin",
hash => {
hash.update("WebWorkerHotUpdateChunkTemplatePlugin");
hash.update("3");
hash.update(
hotUpdateChunkTemplate.outputOptions.hotUpdateFunction + ""
);
hash.update(hotUpdateChunkTemplate.outputOptions.globalObject + "");
}
);
}
}
module.exports = WebWorkerHotUpdateChunkTemplatePlugin;