aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-14 22:09:48 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-14 22:09:48 -0700
commit96d522a7db72178cb4e85589c7b5c9c7fb713edb (patch)
treee7ef43c310fd614f23f1ad4f7fb635a527ebb146
parentb4989a316b4b3dcf0e8e8145aa9541f70122f9ba (diff)
downloadbun-96d522a7db72178cb4e85589c7b5c9c7fb713edb.tar.gz
bun-96d522a7db72178cb4e85589c7b5c9c7fb713edb.tar.zst
bun-96d522a7db72178cb4e85589c7b5c9c7fb713edb.zip
+6 more passing tests
-rw-r--r--src/bundler/bundle_v2.zig9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bundler/bundle_v2.zig b/src/bundler/bundle_v2.zig
index 380f44a83..f5622114a 100644
--- a/src/bundler/bundle_v2.zig
+++ b/src/bundler/bundle_v2.zig
@@ -2883,6 +2883,10 @@ const LinkerContext = struct {
&imports_to_bind[id],
source_index,
);
+
+ if (this.log.errors > 0) {
+ return error.ImportResolutionFailed;
+ }
}
const export_kind = exports_kind[id];
var flag = flags[id];
@@ -6890,7 +6894,7 @@ const LinkerContext = struct {
if (status == .external and c.options.output_format.keepES6ImportExportSyntax()) {
// Imports from external modules should not be converted to CommonJS
// if the output format preserves the original ES6 import statements
- break;
+ continue;
}
// If it's a CommonJS or external file, rewrite the import to a
@@ -6980,9 +6984,8 @@ const LinkerContext = struct {
source,
r,
c.allocator,
- "No matching export \"{s}\" in \"{s}\" for import \"{s}\"",
+ "No matching export in \"{s}\" for import \"{s}\"",
.{
- named_import.alias.?,
next_source.path.pretty,
named_import.alias.?,
},