aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-08-02 18:46:57 -0700
committerGravatar GitHub <noreply@github.com> 2023-08-02 18:46:57 -0700
commitaaaaf744a80bc2876b4edc174a0d86c11625ec20 (patch)
treed0dc3a8b713c2f88f7a3acfc7b6faf8d5f2eb003
parent207c7eb50955eb6f8f4b92fbf5a5955c23ec7e65 (diff)
downloadbun-aaaaf744a80bc2876b4edc174a0d86c11625ec20.tar.gz
bun-aaaaf744a80bc2876b4edc174a0d86c11625ec20.tar.zst
bun-aaaaf744a80bc2876b4edc174a0d86c11625ec20.zip
Remove module and browser conditions (#3935)
* fix astro compiler * clean this up * Update options.zig --------- Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
-rw-r--r--docs/runtime/modules.md3
-rw-r--r--src/options.zig41
2 files changed, 14 insertions, 30 deletions
diff --git a/docs/runtime/modules.md b/docs/runtime/modules.md
index 42f2a08e6..9b8f083d1 100644
--- a/docs/runtime/modules.md
+++ b/docs/runtime/modules.md
@@ -108,8 +108,7 @@ Once it finds the `foo` package, Bun reads the `package.json` to determine how t
"worker": "./index.js",
"module": "./index.js",
"node": "./index.js",
- "default": "./index.js",
- "browser": "./index.js" // lowest priority
+ "default": "./index.js", // lowest priority
}
}
```
diff --git a/src/options.zig b/src/options.zig
index f6b955a47..4f64f60c6 100644
--- a/src/options.zig
+++ b/src/options.zig
@@ -594,37 +594,22 @@ pub const Target = enum {
array.set(Target.node, &[_]string{
"node",
- "module",
});
-
- var listc = [_]string{
+ array.set(Target.browser, &[_]string{
"browser",
"module",
- };
- array.set(Target.browser, &listc);
- array.set(
- Target.bun,
- &[_]string{
- "bun",
- "worker",
- "module",
- "node",
- "default",
- "browser",
- },
- );
- array.set(
- Target.bun_macro,
- &[_]string{
- "macro",
- "bun",
- "worker",
- "module",
- "node",
- "default",
- "browser",
- },
- );
+ });
+ array.set(Target.bun, &[_]string{
+ "bun",
+ "worker",
+ "node",
+ });
+ array.set(Target.bun_macro, &[_]string{
+ "macro",
+ "bun",
+ "worker",
+ "node",
+ });
break :brk array;
};