As you can see, the problem is on the row var a = e3(t4, e3, n4);, originally e3 was a function from outside of the scope of the function, now e3 became one of the parameters of the function.
I don't know what triggers the problem, but if I patch the built file to change e3 to another name, it works, but I cannot reproduce it outside of my (private) project.
What is the expected behavior?
I expect bun to not break my dependency.
What do you see instead?
Bun rename one of the parameters of a function to the name of a function which is outside of its scope, changing the expected value from a function to a string in the variable.
What is the path to the already-minified file in node_modules that has function ZI(...)? I haven't found any version of balanced-match which is already minified
What version of Bun is running?
1.1.30
What platform is your computer?
Darwin 24.0.0 arm64 arm
What steps can reproduce the bug?
In my turborepo project, when I run
bun build ./src/index.ts --outdir ./dist --target bun
in my final project, it breaks one of my file as follow:Original file from my dependency
@react-email/tailwind
fromreact-email
(already built and minified in node_modules).For a better readability I've found the original function in
balanced-match
.This is what bun is giving me as output:
As you can see, the problem is on the row
var a = e3(t4, e3, n4);
, originallye3
was a function from outside of the scope of the function, nowe3
became one of the parameters of the function.I don't know what triggers the problem, but if I patch the built file to change
e3
to another name, it works, but I cannot reproduce it outside of my (private) project.What is the expected behavior?
I expect bun to not break my dependency.
What do you see instead?
Bun rename one of the parameters of a function to the name of a function which is outside of its scope, changing the expected value from a function to a string in the variable.
Additional information
No response