({
externals,
files
}: BundleModules)
| 3239 | // an external the runtime can't share: arktype as an entry, or a package the |
| 3240 | // bundle holds a copy of too |
| 3241 | const unsharedExternalOf = ({ |
| 3242 | externals, |
| 3243 | files |
| 3244 | }: BundleModules): string | undefined => { |
| 3245 | const entry = externals.find(specifier => |
| 3246 | runtimeSpecifiers.includes(specifier) |
| 3247 | ) |
| 3248 | if (entry) return entry |
| 3249 | const shared = externals.filter(specifier => |
| 3250 | externalizableSpecifiers.includes(specifier) |
| 3251 | ) |
| 3252 | if (!shared.length) return |
| 3253 | const bundled = new Set( |
| 3254 | files.flatMap(file => (isAbsolute(file) ? packageOfFile(file) : [])) |
| 3255 | ) |
| 3256 | return shared.find(specifier => bundled.has(packageNameOf(specifier))) |
| 3257 | } |
| 3258 | |
| 3259 | const packagesByDir = new Map<string, string | undefined>() |
| 3260 |
no test coverage detected