From 3df202f91f8bf315caa1b147c8a94e5a4f79176f Mon Sep 17 00:00:00 2001 From: Stefano Date: Wed, 17 Apr 2024 00:43:47 +0200 Subject: [PATCH] Fix(windows) search correct path for esbuild(.exe|.cmd) (#10302) --- scripts/make-old-js.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/make-old-js.ps1 b/scripts/make-old-js.ps1 index 42cdf20c85..b59d95f867 100644 --- a/scripts/make-old-js.ps1 +++ b/scripts/make-old-js.ps1 @@ -3,7 +3,13 @@ $npm_client = "npm" # & ${npm_client} i $root = Join-Path (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) "..\" + +# search for .cmd or .exe $esbuild = Join-Path $root "node_modules\.bin\esbuild.cmd" +if (!(Test-Path $esbuild)) { + $esbuild = Join-Path $root "node_modules\.bin\esbuild.exe" +} + $env:NODE_ENV = "production"