feat(vite): add outfile for build executor (#15002) (#15845)

Co-authored-by: Leng, Errong <eleng@bestbuycanada.ca>
This commit is contained in:
Katerina Skroumpelou 2023-03-23 14:13:25 +02:00 committed by GitHub
parent 750a978b27
commit 64017a27ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,10 @@ export async function* viteBuildExecutor(
});
yield* iterable;
} else {
yield { success: true };
const output = watcherOrOutput?.['output'] || watcherOrOutput?.[0]?.output;
const fileName = output?.[0]?.fileName || 'main.cjs';
const outfile = resolve(normalizedOptions.outputPath, fileName);
yield { success: true, outfile };
}
}