You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey first of all, thanks for putting order into the chaos which is the current state of typescript-treeshaking!
I only have one question.
So the reason the Babili build is only transpiling to ES2015 is because the plugin itself needs ES2015 code to properly analyze dead code?
So in this case if need an ES5 bundle, we'd need to manually (or separately) transpile the bundle into ES5, or is there a way to tell Babili to eventually spit out ES5 code instead of ES2015?
Thanks!!
The text was updated successfully, but these errors were encountered:
First yes, Babili needs ES2015 code to operate properly, It accepts ES5 also, but won't remove the unused classes.
Babili is basically a set of Babel presets, so if it is possible to inject more presets to the plugin it will work to output ES5 code in the end. If it doesn't work from code, try adding them to .babelrc
Maybe not the right place to ask this question, but @BlackSonic do you know why webpack doesn't directly remove the detected unused exports? But instead hands it over to Uglify to do the job, which it can't easily do because the static semantic is already lost after es6->es5 transpilation?
Hey first of all, thanks for putting order into the chaos which is the current state of typescript-treeshaking!
I only have one question.
So the reason the Babili build is only transpiling to ES2015 is because the plugin itself needs ES2015 code to properly analyze dead code?
So in this case if need an ES5 bundle, we'd need to manually (or separately) transpile the bundle into ES5, or is there a way to tell Babili to eventually spit out ES5 code instead of ES2015?
Thanks!!
The text was updated successfully, but these errors were encountered: