-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Is there a way to tree-shake unused imports? #1435
Comments
if the module has side-effects (specifically, |
In fact, Is there any way to externalize AND mark a library as no side effects? It looks like we must install a library locally to tell esbuild to remove it from the output. |
I think I have the same use case. Basically, I wish to have a shared module in a monorepo that can be used from frontend and backend. (But in reality the setup is more advanced that It would be a game changer for me if I could use similar option with snowpack, or like in this request - it would magically omitted.
I think this is not precise enough. |
The way to do this is to mark the relevant package as side-effect free using |
Good morning,
Thank you for this wonderful library.
I am a bit confused about this tree-shaking use-case:
I expect that neither A nor three.js to be bundled, but the latter is getting bundled in. Is tree shaking suppose to remove unused imports along with unused methods/constants?
Thanks in advance!
The text was updated successfully, but these errors were encountered: