We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 76b7178 + d36ff0c commit 786d9f7Copy full SHA for 786d9f7
RequireJsLoaderPlugin.js
@@ -30,6 +30,11 @@ function generateEpilog(imports) {
30
RequireJsLoaderPlugin.prototype.apply = function(compiler) {
31
compiler.plugin('compilation', (compilation, data) => {
32
compilation.plugin('chunk-asset', (chunk, filename) => {
33
+ // Avoid applying imports twice.
34
+ if ('--requirejs-export:done' in chunk) {
35
+ return;
36
+ }
37
+
38
const needsImport = gatherRequireJsImports(chunk.modules);
39
if (needsImport.length != 0) {
40
let prolog = generateProlog(needsImport);
0 commit comments