( build: EsbuildPluginBuild, cwd: string, metafile: Metafile, problem: string )
| 1141 | } |
| 1142 | // a problem fails the build, removing what it wrote |
| 1143 | const rejectEsbuild = ( |
| 1144 | build: EsbuildPluginBuild, |
| 1145 | cwd: string, |
| 1146 | metafile: Metafile, |
| 1147 | problem: string |
| 1148 | ) => { |
| 1149 | if (build.initialOptions.write !== false) { |
| 1150 | for (const path in metafile.outputs) |
| 1151 | rmSync(resolve(cwd, path), { force: true }) |
| 1152 | } |
| 1153 | return { errors: [{ text: problem }] } |
| 1154 | } |
| 1155 | // a standalone bundle's externals, and the calls its folded helpers left, |
| 1156 | // checked once it's written |
| 1157 | const checkEsbuildBundle = (build: EsbuildPluginBuild, cwd: string) => { |
no test coverage detected