(dir: string)
| 240 | |
| 241 | // esbuild splits an entry listed twice into a chunk |
| 242 | export const publicEntryPoints = (dir: string): string[] => [ |
| 243 | ...new Set( |
| 244 | Object.entries<string | { default: string }>( |
| 245 | readPackageJson(dir).exports |
| 246 | ).flatMap(([subpath, target]) => { |
| 247 | const file = typeof target === "string" ? target : target.default |
| 248 | return !subpath.includes("*") && file.endsWith(".js") ? |
| 249 | [join(dir, file)] |
| 250 | : [] |
| 251 | }) |
| 252 | ) |
| 253 | ] |
| 254 | |
| 255 | // each bin entry ships standalone as tsc wrote it, keeping its shebang |
| 256 | const binEntryPoints = (dir: string): string[] => { |
no test coverage detected