1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | "use strict";
|
7 |
|
8 | const ArrayPushCallbackChunkFormatPlugin = require("../javascript/ArrayPushCallbackChunkFormatPlugin");
|
9 | const EnableChunkLoadingPlugin = require("../javascript/EnableChunkLoadingPlugin");
|
10 |
|
11 |
|
12 |
|
13 | class WebWorkerTemplatePlugin {
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 | apply(compiler) {
|
20 | compiler.options.output.chunkLoading = "import-scripts";
|
21 | new ArrayPushCallbackChunkFormatPlugin().apply(compiler);
|
22 | new EnableChunkLoadingPlugin("import-scripts").apply(compiler);
|
23 | }
|
24 | }
|
25 | module.exports = WebWorkerTemplatePlugin;
|