Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
jarym
· 5y ago · 0 comments
Esbuild is certainly fast but I could never figure out how to get it to preserve some symbols during minification (for when I want to expose some class methods or properties publicly to external consumers)
Comments
[–]
vijaybritto
5y ago
Open an issue if you haven't. He is very responsive and thoughtful considering he is the cofounder of Figma a company which is rapidly growing.
[–]
qvq
5y ago
I wonder if window['exposedObject'] = {... would work.
[–]
rizky05
5y ago
esbuild has keepNames options to preserve that
[–]
roryokane
5y ago
Indeed. The relevant documentation:
https://esbuild.github.io/api/#keep-names