File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,14 @@ function hasAMD(chunk) {
22
22
} ) ;
23
23
}
24
24
25
+ function containsModule ( chunk , module ) {
26
+ if ( chunk . containsModule ) {
27
+ return chunk . containsModule ( module ) ;
28
+ } else {
29
+ return chunk . modules . indexOf ( module ) !== - 1 ;
30
+ }
31
+ }
32
+
25
33
module . exports = class DojoLoaderEnsurePlugin {
26
34
constructor ( options ) {
27
35
this . options = options ;
@@ -47,11 +55,11 @@ module.exports = class DojoLoaderEnsurePlugin {
47
55
}
48
56
chunks . forEach ( ( chunk ) => {
49
57
if ( chunk . hasRuntime ( ) && hasAMD ( chunk ) ) {
50
- if ( ! chunk . containsModule ( loaderModule ) ) {
58
+ if ( ! containsModule ( chunk , loaderModule ) ) {
51
59
chunk . addModule ( loaderModule ) ;
52
60
loaderModule . addChunk ( chunk ) ;
53
61
}
54
- if ( configModule && ! chunk . containsModule ( configModule ) ) {
62
+ if ( configModule && ! containsModule ( chunk , configModule ) ) {
55
63
chunk . addModule ( configModule ) ;
56
64
configModule . addChunk ( chunk ) ;
57
65
}
You can’t perform that action at this time.
0 commit comments