diff options
author | 2023-06-02 17:07:16 -0700 | |
---|---|---|
committer | 2023-06-02 17:07:16 -0700 | |
commit | e20e6957751dbc4a8ff84f25b86ca579eb8d000d (patch) | |
tree | b578556ef1288d3b00946a76ea3e91a4dc1bced5 | |
parent | 132ab63a32e6f767b96e7cd117281de5a4684ce2 (diff) | |
download | bun-e20e6957751dbc4a8ff84f25b86ca579eb8d000d.tar.gz bun-e20e6957751dbc4a8ff84f25b86ca579eb8d000d.tar.zst bun-e20e6957751dbc4a8ff84f25b86ca579eb8d000d.zip |
continue if import is standalone (#3178)
-rw-r--r-- | src/linker.zig | 5 | ||||
-rw-r--r-- | test/bundler/bundler_compile.test.ts | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/linker.zig b/src/linker.zig index a2f1dab71..461bcf808 100644 --- a/src/linker.zig +++ b/src/linker.zig @@ -478,8 +478,9 @@ pub const Linker = struct { }; if (resolved_import_) |*resolved_import| { - if (resolved_import.is_external) { - externals.append(record_index) catch unreachable; + if (resolved_import.is_external or resolved_import.is_standalone_module) { + if (resolved_import.is_external) + externals.append(record_index) catch unreachable; continue; } diff --git a/test/bundler/bundler_compile.test.ts b/test/bundler/bundler_compile.test.ts index 6e4b86f14..4c890feef 100644 --- a/test/bundler/bundler_compile.test.ts +++ b/test/bundler/bundler_compile.test.ts @@ -5,7 +5,6 @@ var { describe, test, expect } = testForFile(import.meta.path); describe("bundler", () => { itBundled("compile/HelloWorld", { - todo: true, compile: true, files: { "/entry.ts": /* js */ ` @@ -15,7 +14,6 @@ describe("bundler", () => { run: { stdout: "Hello, world!" }, }); itBundled("compile/VariousBunAPIs", { - todo: true, compile: true, files: { "/entry.ts": ` @@ -45,7 +43,6 @@ describe("bundler", () => { run: { stdout: "ok" }, }); itBundled("compile/ReactSSR", { - todo: true, install: ["react@next", "react-dom@next"], files: { "/entry.tsx": /* tsx */ ` |