Skip to content

Commit d36ff0c

Browse files
committed
Avoid conflict with requirejs-export-plugin v1.1.0.
1 parent 76b7178 commit d36ff0c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

RequireJsLoaderPlugin.js

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ function generateEpilog(imports) {
3030
RequireJsLoaderPlugin.prototype.apply = function(compiler) {
3131
compiler.plugin('compilation', (compilation, data) => {
3232
compilation.plugin('chunk-asset', (chunk, filename) => {
33+
// Avoid applying imports twice.
34+
if ('--requirejs-export:done' in chunk) {
35+
return;
36+
}
37+
3338
const needsImport = gatherRequireJsImports(chunk.modules);
3439
if (needsImport.length != 0) {
3540
let prolog = generateProlog(needsImport);

0 commit comments

Comments
 (0)