Skip to content

Commit

Permalink
Use env variable ESBUILD_BINARY_PATH to use different binary path (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
remorses authored Dec 18, 2020
1 parent d63f986 commit b1cb605
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ declare const ESBUILD_VERSION: string;
declare const WASM: boolean;

let esbuildCommandAndArgs = (): [string, string[]] => {
if (process.env.ESBUILD_BINARY_PATH) {
return [path.resolve(process.env.ESBUILD_BINARY_PATH), []];
}

if (WASM) {
return ['node', [path.join(__dirname, '..', 'bin', 'esbuild')]];
}
Expand Down

0 comments on commit b1cb605

Please sign in to comment.