(metafile: Metafile, cwd: string)
| 3222 | } |
| 3223 | |
| 3224 | const esbuildBundleOf = (metafile: Metafile, cwd: string): BundleModules => ({ |
| 3225 | externals: Object.values(metafile.outputs).flatMap( |
| 3226 | output => |
| 3227 | output.imports?.flatMap(entry => (entry.external ? entry.path : [])) ?? [] |
| 3228 | ), |
| 3229 | files: Object.keys(metafile.inputs).map(path => resolve(cwd, path)), |
| 3230 | importerOf: Object.fromEntries( |
| 3231 | Object.entries(metafile.inputs).flatMap(([path, { imports }]) => |
| 3232 | imports.flatMap(entry => |
| 3233 | entry.external ? [[entry.path, resolve(cwd, path)]] : [] |
| 3234 | ) |
| 3235 | ) |
| 3236 | ) |
| 3237 | }) |
| 3238 | |
| 3239 | // an external the runtime can't share: arktype as an entry, or a package the |
| 3240 | // bundle holds a copy of too |
no test coverage detected