diff options
author | 2023-08-24 17:03:05 -0700 | |
---|---|---|
committer | 2023-08-24 17:03:05 -0700 | |
commit | d2bef4fbeae798cde08745b211d150417428b270 (patch) | |
tree | b45f9eb48b72d48ee75e9c7ac6004fac65c5cf6a | |
parent | 19aa9d93de0971513b1ff94ab72b54c7c2031dda (diff) | |
download | bun-d2bef4fbeae798cde08745b211d150417428b270.tar.gz bun-d2bef4fbeae798cde08745b211d150417428b270.tar.zst bun-d2bef4fbeae798cde08745b211d150417428b270.zip |
Don't inline require/import errors at runtime (#4306)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
-rw-r--r-- | src/js_printer.zig | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/js_printer.zig b/src/js_printer.zig index ca8b18ad0..57ef580b6 100644 --- a/src/js_printer.zig +++ b/src/js_printer.zig @@ -1828,14 +1828,16 @@ fn NewPrinter( if (record.kind != .dynamic) { p.printSpaceBeforeIdentifier(); - if (record.path.is_disabled and record.handles_import_errors and !is_external and p.options.inline_require_and_import_errors) { - p.printRequireError(record.path.text); - return; - } + if (p.options.inline_require_and_import_errors) { + if (record.path.is_disabled and record.handles_import_errors and !is_external) { + p.printRequireError(record.path.text); + return; + } - if (record.path.is_disabled) { - p.printDisabledImport(); - return; + if (record.path.is_disabled) { + p.printDisabledImport(); + return; + } } if (comptime is_bun_platform) { |