Open egoist opened 2 years ago
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