Update src/bundler/bundle_v2.zig

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
snwy
2024-09-27 20:16:18 -07:00
committed by GitHub
parent bb81cd0341
commit 282fbd76cd

View File

@@ -7623,7 +7623,7 @@ pub const LinkerContext = struct {
}) catch bun.outOfMemory();
}
const source: *Logger.Source = &input_files[source_index];
const source: *const Logger.Source = &input_files[source_index];
const imported_pretty_path = source.path.pretty;
const text: string = if (strings.eql(imported_pretty_path, tla_pretty_path))
std.fmt.allocPrint(c.allocator, "This require call is not allowed because the imported file \"{s}\" contains a top-level await", .{imported_pretty_path}) catch bun.outOfMemory()