nav tabs on admin dashboard
This commit is contained in:
34
node_modules/webpack/lib/webworker/WebWorkerChunkTemplatePlugin.js
generated
vendored
34
node_modules/webpack/lib/webworker/WebWorkerChunkTemplatePlugin.js
generated
vendored
@@ -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}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user