-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
esbuild doesn't remove unused imports from external modules #1794
Comments
same problem here... // helper.js
import scrollIntoView from "scroll-into-view";
export async function centerScroll(){
return scrollIntoView(/* ... */)
}
export async function delay(){
// ...
} import {delay} from "./helper.js"
/* this causes scrollIntoView to also be in the bundle! */ |
darn it! i was going to move to esbuild |
any updates on this? |
i wish this could be fixed, esbuild is literally perfect.... except this problem, one of the reasons to use a bundler is because of the tree shaking |
Any updates on this? Maybe a plugin could help? |
Darn I'm seeing this as well... |
Thought I was going mad. Also seeing this when using named imports |
hopefully one day.... |
Any updates? esbuild bundles everything |
Any updates? |
This is a huge problem! |
Tested against:
The command I ran:
Result, unused imports from
vue
:Online playground:
https://stackblitz.com/edit/node-fm1edb?file=readme.md
The text was updated successfully, but these errors were encountered: