I’ve been trying to find ways to cut down on our b...
# javascript
s
I’ve been trying to find ways to cut down on our bundle size and one of the thing that I noticed is that all of the data class
toString()
methods are huge and do not minify or compress well at all. Tree shaking can’t get rid of them because they’re member functions. It would be awesome if there were a compiler flag to disable
toString()
generation for production builds. I realize some code might break, but I think that by-and-large folks use the nice
toString()
methods for debugging and don’t need them in prod bundles. Anybody have any other clever ideas?
t
Compiler plugin? 😉
a
Pretty sure there is one that exists
s
Wow cool!