(p: string)
| 216 | entries = await globEntries(explicitEntryPatterns, environment) |
| 217 | } else if (buildInput) { |
| 218 | const resolvePath = async (p: string) => { |
| 219 | // `build.rollupOptions.input` is resolved from the root (not `process.cwd()`) |
| 220 | // by the build, so resolve it from the root here too by not passing an importer. |
| 221 | const id = ( |
| 222 | await environment.pluginContainer.resolveId(p, undefined, { |
| 223 | isEntry: true, |
| 224 | scan: true, |
| 225 | }) |
| 226 | )?.id |
| 227 | if (id === undefined) { |
| 228 | throw new Error( |
| 229 | `failed to resolve rolldownOptions.input value: ${JSON.stringify(p)}.`, |
| 230 | ) |
| 231 | } |
| 232 | return id |
| 233 | } |
| 234 | if (typeof buildInput === 'string') { |
| 235 | entries = [await resolvePath(buildInput)] |
| 236 | } else if (Array.isArray(buildInput)) { |
no test coverage detected