Open muuvmuuv opened 7 months ago
Out of curiosity, is this something you can do in esbuild
?
Valid point. Yes. Still it would have comments left, and some JS is not minified but just by using --compile.
bun esbuild src/main.ts --bundle --outfile=server-minified --platform=node --format=esm --minify --legal-comments=none
bun bun ./server-minified --compile --outfile=server
many places in the current code have markers for this.
most of the work for this would be to just copy esbuild's implementation and port into zig
What is the problem this feature would solve?
To minify the bundle (w/o --compile) it would be great to have the licence exported to another file or to be removed completely. Also some JS is still unminified.
What is the feature you are proposing to solve the problem?
Minify compiled bundle more.
What alternatives have you considered?
Manually
sed
it out or with esbuild like explained below.