Skip to content

Commit 786d9f7

Browse files
author
Gil Greenberg
authored
Merge pull request #1 from toddbc/export
Avoid conflict with requirejs-export-plugin v1.1.0
2 parents 76b7178 + d36ff0c commit 786d9f7

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)