Skip to content
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

Tree shaking in EcmaScript #10

Open
ISV-Kran opened this issue Sep 8, 2020 · 2 comments
Open

Tree shaking in EcmaScript #10

ISV-Kran opened this issue Sep 8, 2020 · 2 comments
Labels
enhancement New feature or request up-for-grabs

Comments

@ISV-Kran
Copy link

ISV-Kran commented Sep 8, 2020

Hi adams85 and thanks for this great bundling.

I'm using EcmaScript for ES6 support and it seems the whole file has being imported. Is it possible to eliminate dead code and import only what is really needed?

TO REPRODUCE THE CASE:
In TypeScriptDemo add a "treeShaking" function to foo.js. Running the application main.js will include the function, even if it has not been imported.

WHAT EXPECTED:
main.js without the "treeShaking" function.

@adams85
Copy link
Owner

adams85 commented Sep 9, 2020

Hi!

Unfortunately, tree shaking is not implemented currently. It would definitely be useful but according to my estimations it needs a considerable time investment, which I can't afford anytime soon.

But I'll leave open your issue as I'd like to include this feature in the lib eventually.

@adams85 adams85 added enhancement New feature or request up-for-grabs labels Sep 9, 2020
@ISV-Kran
Copy link
Author

Great news here! Tree shaking is already performed by Nuglify during minification, so there is no need to implement it.

Keep this project up, is awesome and well implemented :)

@ISV-Kran ISV-Kran reopened this Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request up-for-grabs
Projects
None yet
Development

No branches or pull requests

2 participants