oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.2k stars 2.77k forks source link

[pug] [bun build] SyntaxError: An error occurred while parsing code with `--sourcemap` #14925

Open mavyfaby opened 1 week ago

mavyfaby commented 1 week ago

What version of Bun is running?

1.1.33+247456b67

What platform is your computer?

Linux 6.11.0-9-generic x86_64 x86_64

What steps can reproduce the bug?

I have a code:

import { compile } from "pug";

const test = compile("test test");

console.log(test());

I'm using pug for compiling email templates. When I compile the app with --sourcemap flag it shows:

Image

But if no --sourcemap it successfully compiles:

Image

P.S: I discovered it was --sourcemap because I'm omitting the flags one by one to see if it works or not, luckily I found it was --sourcemap.

What is the expected behavior?

Should compile without errors.

What do you see instead?

Image

Additional information

No response

sequencerr commented 1 week ago

I also had troubles because of --sourcemap with compiling single file executable

rafaelrpinto commented 1 week ago

Possibly the same issue as https://github.com/oven-sh/bun/issues/14879