Bun.build
bundler does not simplify template strings when used with Ts enums
#14022
Labels
Bun.build
bundler does not simplify template strings when used with Ts enums
#14022
What version of Bun is running?
1.1.28+cf4e9cb69
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
Build the following code:
Show code
using the following settings:
What is the expected behavior?
With the following settings:
ESBuild outputs the following code:
Show code
and, as you can see, the enum values are inlined into the template string just fine.
What do you see instead?
Bun outputs the following:
Show code
where the enum values are embedded in a non-optimal way
Additional information
tl;dr of the issue:
ESbuild produces
`foo bar baz`
while Bun produces
`foo ${"bar"} baz`
at the same time, trying to create a simple reproduction always results with Bun producing the same code, for example trying to build
produces
in either case, ESBuild and Bun.
The text was updated successfully, but these errors were encountered: