chore: fix esbuild path on win

This commit is contained in:
Nurul Huda (Apon) 2026-07-12 16:22:05 +06:00
parent 1365558a95
commit fd0f9a6b8d
No known key found for this signature in database
GPG key ID: 5D3F1DE2855A2F79
2 changed files with 2 additions and 2 deletions

View file

@ -76,7 +76,7 @@ fn innerInitSingle(b: *std.Build, build_item: Build) !Output {
fn resolveHostEsbuild(plugin_dep: *std.Build.Dependency) ?std.Build.LazyPath {
const host_dep = plugin_dep.builder.lazyDependency(host_esbuild.depName(), .{}) orelse return null;
// zig fetch strips the npm tarball's top-level `package/` directory.
return host_dep.path(plugin_dep.builder.fmt("bin/{s}", .{host_esbuild.exeName()}));
return host_dep.path(plugin_dep.builder.fmt("{s}", .{host_esbuild.exeName()}));
}
fn deriveName(b: *std.Build, self: Build, step: *std.Build.Step) []const u8 {

View file

@ -52,7 +52,7 @@ pub fn depName() []const u8 {
/// Filename of the esbuild executable inside the npm package tarball.
pub fn exeName() []const u8 {
return if (builtin.os.tag == .windows) "esbuild.exe" else "esbuild";
return if (builtin.os.tag == .windows) "esbuild.exe" else "bin/esbuild";
}
fn unsupported() noreturn {