aboutsummaryrefslogtreecommitdiff
path: root/src/resolver
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolver')
-rw-r--r--src/resolver/package_json.zig2
-rw-r--r--src/resolver/resolver.zig4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/resolver/package_json.zig b/src/resolver/package_json.zig
index 75b7a9e00..63bc5b20b 100644
--- a/src/resolver/package_json.zig
+++ b/src/resolver/package_json.zig
@@ -708,7 +708,7 @@ pub const PackageJSON = struct {
}
// Read the "browser" property, but only when targeting the browser
- if (r.opts.platform.supportsBrowserField()) {
+ if (r.opts.target.supportsBrowserField()) {
// We both want the ability to have the option of CJS vs. ESM and the
// option of having node vs. browser. The way to do this is to use the
// object literal form of the "browser" field like this:
diff --git a/src/resolver/resolver.zig b/src/resolver/resolver.zig
index 61717ada9..48c6b2889 100644
--- a/src/resolver/resolver.zig
+++ b/src/resolver/resolver.zig
@@ -570,7 +570,7 @@ pub const Resolver = struct {
.node_module_bundle = opts.node_modules_bundle,
.log = log,
.extension_order = opts.extension_order,
- .care_about_browser_field = opts.platform.isWebLike(),
+ .care_about_browser_field = opts.target.isWebLike(),
};
}
@@ -3170,7 +3170,7 @@ pub const Resolver = struct {
const main_field_values = pkg_json.main_fields;
const main_field_keys = r.opts.main_fields;
// TODO: check this works right. Not sure this will really work.
- const auto_main = r.opts.main_fields.ptr == options.Platform.DefaultMainFields.get(r.opts.platform).ptr;
+ const auto_main = r.opts.main_fields.ptr == options.Target.DefaultMainFields.get(r.opts.target).ptr;
if (r.debug_logs) |*debug| {
debug.addNoteFmt("Searching for main fields in \"{s}\"", .{pkg_json.source.path.text});