Skip to content

Commit

Permalink
fix(esbuild): don't set outfile or outdir if already defined (#14636)
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmale97 authored Apr 4, 2023
1 parent 63e67bf commit 3636756
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ export function buildEsbuildOptions(
esbuildOptions.define = getClientEnvironment();
}

if (options.singleEntry && options.bundle) {
esbuildOptions.outfile = getOutfile(format, options, context);
} else {
esbuildOptions.outdir = options.outputPath;
if (!esbuildOptions.outfile && !esbuildOptions.outdir) {
if (options.singleEntry && options.bundle && !esbuildOptions.splitting) {
esbuildOptions.outfile = getOutfile(format, options, context);
} else {
esbuildOptions.outdir = options.outputPath;
}
}

const entryPoints = options.additionalEntryPoints
Expand Down

0 comments on commit 3636756

Please sign in to comment.