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"