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

Allow ESM and tree shaking #68

Closed
nfroidure opened this issue Mar 30, 2020 · 0 comments
Closed

Allow ESM and tree shaking #68

nfroidure opened this issue Mar 30, 2020 · 0 comments

Comments

@nfroidure
Copy link
Owner

nfroidure commented Mar 30, 2020

Lambdas / functions size could be reduced if the build could use three shaking and if types requirement could be well cleaned up.

It would avoid the need to remove heavy unused libs by hand like here :
a5713fc

And to lazy load some imports :
f3ae3e2#diff-2b9953ab2999d5b91554d3a2d755863dR63

A good resource on doing this :
https://medium.com/@iamstan/tips-for-writing-es-modules-in-node-js-96ec688615a4

Also chase /dist/ imports to replace them by main imports since tree shaking wil avoid it to import the whole libs.

@nfroidure nfroidure changed the title Allow ESM and tre shakung Allow ESM and tree shaking Mar 31, 2020
nfroidure added a commit that referenced this issue Apr 1, 2020
nfroidure added a commit that referenced this issue Apr 2, 2020
nfroidure added a commit that referenced this issue Apr 2, 2020
nfroidure added a commit that referenced this issue Apr 2, 2020
nfroidure added a commit that referenced this issue Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant