diff options
author | 2023-04-26 22:36:56 -0700 | |
---|---|---|
committer | 2023-04-26 22:36:56 -0700 | |
commit | f1c1f556a3e962454bae481cc54ca9acf194d141 (patch) | |
tree | 3067985570eb3abbfc870968e2a485c0f39f70f9 | |
parent | 6142f6eb61ff95821363c44c709e3a038e61dd54 (diff) | |
download | bun-f1c1f556a3e962454bae481cc54ca9acf194d141.tar.gz bun-f1c1f556a3e962454bae481cc54ca9acf194d141.tar.zst bun-f1c1f556a3e962454bae481cc54ca9acf194d141.zip |
more esbuild compat
-rw-r--r-- | src/bun.js/api/JSBundler.zig | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/bun.js/api/JSBundler.zig b/src/bun.js/api/JSBundler.zig index 8a4d62b13..50160f1dc 100644 --- a/src/bun.js/api/JSBundler.zig +++ b/src/bun.js/api/JSBundler.zig @@ -88,9 +88,9 @@ pub const JSBundler = struct { this.target = target; } - if (try config.getOptional(globalThis, "hot", bool)) |hot| { - this.hot = hot; - } + // if (try config.getOptional(globalThis, "hot", bool)) |hot| { + // this.hot = hot; + // } if (try config.getOptional(globalThis, "splitting", bool)) |hot| { this.code_splitting = hot; @@ -103,9 +103,10 @@ pub const JSBundler = struct { if (config.getTruthy(globalThis, "minify")) |hot| { if (hot.isBoolean()) { - this.minify.whitespace = hot.coerce(bool, globalThis); - this.minify.syntax = this.minify.whitespace; - this.minify.identifiers = this.minify.whitespace; + const value = hot.coerce(bool, globalThis); + this.minify.whitespace = value; + this.minify.syntax = value; + this.minify.identifiers = value; } else if (hot.isObject()) { if (try hot.getOptional(globalThis, "whitespace", bool)) |whitespace| { this.minify.whitespace = whitespace; @@ -122,7 +123,7 @@ pub const JSBundler = struct { } } - if (try config.getArray(globalThis, "entrypoints")) |entry_points| { + if (try config.getArray(globalThis, "entrypoints") orelse try config.getArray(globalThis, "entryPoints")) |entry_points| { var iter = entry_points.arrayIterator(globalThis); while (iter.next()) |entry_point| { var slice = entry_point.toSliceOrNull(globalThis) orelse { |