Fix(windows) search correct path for esbuild(.exe|.cmd) (#10302)

This commit is contained in:
Stefano
2024-04-17 00:43:47 +02:00
committed by GitHub
parent df190815df
commit 3df202f91f

View File

@@ -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"