File tree 1 file changed +21
-23
lines changed
1 file changed +21
-23
lines changed Original file line number Diff line number Diff line change @@ -321,29 +321,27 @@ class ModuleConcatenationPlugin {
321
321
}
322
322
323
323
getImports ( module ) {
324
- return Array . from (
325
- new Set (
326
- module . dependencies
327
-
328
- // Only harmony Dependencies
329
- . filter ( dep => dep instanceof HarmonyImportDependency )
330
-
331
- // Get reference info for this dependency
332
- . map ( dep => dep . getReference ( ) )
333
-
334
- // Reference is valid and has a module
335
- . filter ( ref => ref && ref . module )
336
-
337
- // Dependencies are simple enough to concat them
338
- . filter (
339
- ref =>
340
- Array . isArray ( ref . importedNames ) ||
341
- Array . isArray ( ref . module . buildMeta . providedExports )
342
- )
343
-
344
- // Take the imported module
345
- . map ( ref => ref . module )
346
- )
324
+ return new Set (
325
+ module . dependencies
326
+
327
+ // Get reference info only for harmony Dependencies
328
+ . map (
329
+ dep =>
330
+ dep instanceof HarmonyImportDependency ? dep . getReference ( ) : null
331
+ )
332
+
333
+ // Reference is valid and has a module
334
+ // Dependencies are simple enough to concat them
335
+ . filter (
336
+ ref =>
337
+ ref &&
338
+ ref . module &&
339
+ ( Array . isArray ( ref . importedNames ) ||
340
+ Array . isArray ( ref . module . buildMeta . providedExports ) )
341
+ )
342
+
343
+ // Take the imported module
344
+ . map ( ref => ref . module )
347
345
) ;
348
346
}
349
347
You can’t perform that action at this time.
0 commit comments