aboutsummaryrefslogtreecommitdiff
path: root/src/resolver
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolver')
-rw-r--r--src/resolver/resolver.zig1
-rw-r--r--src/resolver/tsconfig_json.zig9
2 files changed, 7 insertions, 3 deletions
diff --git a/src/resolver/resolver.zig b/src/resolver/resolver.zig
index 58f00c2af..068b22dc4 100644
--- a/src/resolver/resolver.zig
+++ b/src/resolver/resolver.zig
@@ -3758,6 +3758,7 @@ pub const Resolver = struct {
merged_config.base_url_for_paths = parent_config.base_url_for_paths;
}
merged_config.jsx = parent_config.mergeJSX(merged_config.jsx);
+ merged_config.jsx_flags.setUnion(parent_config.jsx_flags);
if (parent_config.preserve_imports_not_used_as_values) |value| {
merged_config.preserve_imports_not_used_as_values = value;
diff --git a/src/resolver/tsconfig_json.zig b/src/resolver/tsconfig_json.zig
index 7121e8741..7ec6b3e0b 100644
--- a/src/resolver/tsconfig_json.zig
+++ b/src/resolver/tsconfig_json.zig
@@ -157,11 +157,14 @@ pub const TSConfigJSON = struct {
if (compiler_opts.expr.asProperty("jsx")) |jsx_prop| {
if (jsx_prop.expr.asString(allocator)) |str| {
+ var str_lower = allocator.alloc(u8, str.len) catch unreachable;
+ defer allocator.free(str_lower);
+ _ = strings.copyLowercase(str, str_lower);
// we don't support "preserve" yet
- if (options.JSX.RuntimeMap.get(str)) |runtime| {
+ if (options.JSX.RuntimeMap.get(str_lower)) |runtime| {
result.jsx.runtime = runtime;
if (runtime == .automatic) {
- result.jsx.setProduction(!strings.contains(str, "jsxDEV"));
+ result.jsx.setProduction(!strings.contains(str_lower, "jsxdev"));
is_jsx_development = result.jsx.development;
result.jsx_flags.insert(.development);
}
@@ -179,7 +182,7 @@ pub const TSConfigJSON = struct {
result.jsx_flags.insert(.runtime);
}
- result.jsx.package_name = options.JSX.Pragma.parsePackageName(str);
+ result.jsx.package_name = str;
result.jsx.setImportSource(allocator);
result.jsx_flags.insert(.import_source);
}