diff options
-rw-r--r-- | src/resolver/package_json.zig | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/resolver/package_json.zig b/src/resolver/package_json.zig index eefb5474b..1ac221998 100644 --- a/src/resolver/package_json.zig +++ b/src/resolver/package_json.zig @@ -71,9 +71,6 @@ pub const PackageJSON = struct { scripts: ?*ScriptsMap = null, - always_bundle: []string = &.{}, - macros: MacroMap = MacroMap{}, - // Present if the "browser" field is present. This field is intended to be // used by bundlers and lets you redirect the paths of certain 3rd-party // modules that don't work in the browser to other modules that shim that @@ -566,7 +563,6 @@ pub const PackageJSON = struct { .hash = 0xDEADBEEF, .source = json_source, .module_type = .unknown, - .macros = MacroMap{}, .browser_map = BrowserMap.init(r.allocator), .main_fields = MainFieldMap.init(r.allocator), }; @@ -616,31 +612,6 @@ pub const PackageJSON = struct { } } - if (json.asProperty("bun")) |bun_json| { - if (bun_json.expr.asProperty("alwaysBundle")) |bundle_| { - if (bundle_.expr.data == .e_array) { - var always_bundle_count: u16 = 0; - const array = bundle_.expr.data.e_array.items; - for (array) |item| { - always_bundle_count += @intCast(u16, @boolToInt(item.data == .e_string and item.data.e_string.utf8.len > 0)); - } - package_json.always_bundle = r.allocator.alloc(string, always_bundle_count) catch unreachable; - - var i: u16 = 0; - for (array) |item| { - if (!(item.data == .e_string and item.data.e_string.utf8.len > 0)) continue; - package_json.always_bundle[i] = item.asString(r.allocator).?; - i += 1; - } - // for (var i = 0; i < bundle_.expr.data.e_array.len; i++) { - } - } - - if (bun_json.expr.asProperty("macros")) |macros| { - package_json.macros = parseMacrosJSON(r.allocator, macros.expr, r.log, &json_source); - } - } - // Read the "main" fields for (r.opts.main_fields) |main| { if (json.asProperty(main)) |main_json| { |