({
stdin,
absWorkingDir = process.cwd()
}: EsbuildBuild["initialOptions"])
| 2887 | |
| 2888 | // esbuild's stdin, as a file beside what it imports |
| 2889 | const stdinEntryOf = ({ |
| 2890 | stdin, |
| 2891 | absWorkingDir = process.cwd() |
| 2892 | }: EsbuildBuild["initialOptions"]): Required<ScanEntry> | undefined => { |
| 2893 | if (!stdin) return |
| 2894 | const ext = |
| 2895 | stdin.loader === "ts" || stdin.loader === "tsx" || stdin.loader === "jsx" ? |
| 2896 | stdin.loader |
| 2897 | : "js" |
| 2898 | return { |
| 2899 | id: join(stdin.resolveDir ?? absWorkingDir, `<stdin>.${ext}`), |
| 2900 | source: String(stdin.contents) |
| 2901 | } |
| 2902 | } |
| 2903 | |
| 2904 | // esbuild names stdin as a file only where both resolveDir and sourcefile are set |
| 2905 | const isStdinOf = ( |
no test coverage detected