From 235aa05d6495435f5fd786df9bc00ac4110d405b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Z=C3=BCnd?= Date: Thu, 24 Oct 2024 11:11:31 +0200 Subject: [PATCH] [build] Fix esbuild bundling on windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R=kprokopenko@chromium.org Bug: None Change-Id: I19a809628072e94d96a35d04ec8615412b5b68ba Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5961818 Reviewed-by: Kateryna Prokopenko Commit-Queue: Kateryna Prokopenko Auto-Submit: Simon Zünd Commit-Queue: Simon Zünd --- scripts/build/esbuild.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build/esbuild.js b/scripts/build/esbuild.js index 97647bd823..1881a0321e 100644 --- a/scripts/build/esbuild.js +++ b/scripts/build/esbuild.js @@ -5,12 +5,14 @@ // @ts-check const path = require('path'); +const os = require('os'); const devtools_paths = require('../devtools_paths.js'); const devtools_plugin = require('./devtools_plugin.js'); // esbuild module uses binary in this path. -process.env.ESBUILD_BINARY_PATH = path.join(devtools_paths.devtoolsRootPath(), 'third_party', 'esbuild', 'esbuild'); +const binaryName = os.type() === 'Windows_NT' ? 'esbuild.exe' : 'esbuild'; +process.env.ESBUILD_BINARY_PATH = path.join(devtools_paths.devtoolsRootPath(), 'third_party', 'esbuild', binaryName); const entryPoints = [process.argv[2]]; const outfile = process.argv[3];