-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question regarding ES5/ES2015 #40
Comments
First yes, Babili needs ES2015 code to operate properly, It accepts ES5 also, but won't remove the unused classes. |
For ES5 bundle, it seems not working to use tree shaking with Babili. |
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? |
@jack4it I think it is designed this way. Maybe after the release of Webpack 2 they will implement Rollup like tree-shaking |
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: