| 74 | * @returns {boolean} true when at least one library wrapper passes externals as closure arguments |
| 75 | */ |
| 76 | const hasClosureLibrary = (output) => { |
| 77 | const enabled = output.enabledLibraryTypes; |
| 78 | if (enabled) { |
| 79 | for (const type of enabled) { |
| 80 | if (CLOSURE_LIBRARY_TYPES.has(type)) return true; |
| 81 | } |
| 82 | } |
| 83 | if (output.library && output.library.type) { |
| 84 | return CLOSURE_LIBRARY_TYPES.has(output.library.type); |
| 85 | } |
| 86 | return false; |
| 87 | }; |
| 88 | |
| 89 | /** |
| 90 | * Collects request strings from statically-enumerable externals (string, |