Closed ajfhs812 closed 1 day ago
Can you share the code before compiling and obfuscation?
Hello @ajfhs812. Please provide a minimal reproduction using a GitHub repository, Replit, or CodeSandbox. Issues marked with needs repro
will be closed if they have no activity within 3 days.
What version of Bun is running?
1.1.27+267afa293
What platform is your computer?
Darwin 23.1.0 x86_64 i386
What steps can reproduce the bug?
bun run <path_to_the_file>.js
.How did I get the code:
NODE_ENV=production bun build --minify --target=browser <PATH_TO_INPUT_FILE> --outfile=<PATH_TO_OUTPUT_FILE>
).NODE_ENV=production bunx terser <PATH_TO_INPUT_MINIFIED_FILE> --compress='drop_console=false,unsafe_arrows=true,unsafe_comps=true,unsafe_Function=true,unsafe_math=true,unsafe_symbols=true,unsafe_methods=true,unsafe_proto=true,unsafe_regexp=true,unsafe_undefined=true,unsafe=true,ecma=2020,hoist_funs=true,toplevel=true,pure_new=true,passes=10' --format='semicolons=true,beautify=false,ecma=2020,quote_style=1' --mangle 'eval=true,module=true,toplevel=true' --mangle-props --toplevel --comments=false --indent_level=1 --module -o <PATH_TO_OUTPUT_UGLIFIED_FILE>
).P.S: if you need the source code of some (or even each) of these steps, let me know.
What is the expected behavior?
What do you see instead?
Bun is doing it much slower than expected.
Additional information
Benchmark results for that code I provided above:
Computer specs: