unplugin-auto-import 20.3.0 + unplugin-vue-components 29.2.0 on Vue 3.5.43 / Vite 7.3.6: 40 components, 40 utils, 20 composables. Import lines 382 → 22 (−360). Warm production build medians (minify off, 7 rounds): manual 940 ms vs auto 1,207 ms (+267 ms); both 105 modules; JS 209.03 → 210.88 kB.
5 min read
I rebuilt the same Vue 3 + Vite 7 app two ways: with hand-written imports (382 import lines) and with unplugin-auto-import 20.3 plus unplugin-vue-components 29.2 (22 import lines left). That dropped 360 import statements. Warm production build medians were 940 ms manual versus 1,207 ms with the plugins (+267 ms), same 105 modules transformed.
Short answer: adopt auto-import on Vue apps where composables and shared utils are the noise, and accept a small build tax. Skip it on tiny apps or teams that want every dependency visible at the top of the file. No affiliate links in this post.
imports: ["vue"], dirs src/composables and src/utils, vueTemplate: true, dts off. Components plugin scans src/components.import { ref, computed } from "vue" inside composables, plus createApp/App in main. AutoImport could erase those too; I left them to show a conservative cut.| Tree | Import lines | Components | Utils | Composables |
|---|---|---|---|---|
| Manual (explicit) | 382 | 40 | 40 | 20 |
| Auto (plugins on) | 22 | 40 | 40 | 20 |
| Removed | 360 | — | — | — |
Most of the cut was repetitive import { uN } from '../utils/uN' and import { useThingN } from '../composables/...' inside components, plus 40 App-level component imports replaced by the Components plugin. That pairing matches how Vue teams usually adopt this stack; AutoImport alone would not resolve <CompN/> in the template.
For Vue typing and SFC tooling around the same stack, see the vue-tsc / Vue Language Tools 3.3.12 notes.
| Run (production, minify off) | Wall median (7) | Modules | JS size |
|---|---|---|---|
| Manual imports | 940 ms | 105 | 209.03 kB |
| AutoImport + Components | 1,207 ms | 105 | 210.88 kB |
| Delta | +267 ms | 0 | +1.85 kB |
Yes, on this fixture. The plugins scan dirs and rewrite unresolved identifiers, so the transform step pays a fixed cost even when the module graph width stays the same. 267 ms is noticeable in a tight local loop and usually fine in CI next to install and test time.
If your pain is bundler choice rather than imports, the Vite vs Parcel and Rolldown vs Rollup posts cover that axis. Unused-export cleanup after adopting auto-import pairs with Knip vs depcheck.
| Situation | My pick |
|---|---|
| Vue 3 app with many shared composables/utils | Yes |
| Also tired of importing every SFC in App/layouts | Pair with unplugin-vue-components |
| Tiny prototype under ~15 components | Skip; explicit imports stay clearer |
| Team rule: every symbol shows its module path | Skip |
| Already on Nuxt | Use Nuxt auto-imports; do not double-stack |
| Need generated .d.ts committed for CI editors | Turn dts on and budget the extra file churn |
Bottom line: 360 fewer import lines for +267 ms on a 40-component Vite build is a trade I would take on a mid-size Vue app, and refuse on a tiny one where the plugins obscure more than they save. For the broader Vite toolchain pitch, see Vite+ 1.0.
How this was made: I generated matching manual and auto-import Vue trees on the ShopperCove test box, timed interleaved Vite builds, counted import lines with a small script, and kept the JSON; the write-up was drafted with AI help and checked against that output.
Lab evidence
Hands-on on ShopperCove box 6 Oct 2026 ~00:05–00:10 IST (8 vCPU Intel Xeon / 15 GB shared Linux, Node 22.20.0). Vite 7.3.6, Vue 3.5.43, @vitejs/plugin-vue 6.0.9, unplugin-auto-import 20.3.0, unplugin-vue-components 29.2.0. Fixture /workspace/bench-auto-import/: matching manual (src-manual) and auto (src-auto) trees — AutoImport dirs composables+utils, imports:[vue], vueTemplate; Components dirs components; minify false. Counted import lines via script (382 vs 22). Local vite binary; 1 warm-up + 7 interleaved rounds swapping active src. Warm medians 940 ms vs 1207 ms. Raw: /workspace/bench-auto-import/res-auto-import.json. Not tested: Nuxt auto-imports, React/Solid presets, dts:true CI churn, IDE go-to-definition edge cases, Windows/macOS. No affiliate.
Hands-on6 Oct 20268 min read
Hands-on6 Oct 20264 min read
vite-plugin-checker 0.10.3 with enableBuild on Vite 7.3.6 / TS 5.9.3 / React 19: clean wall medians plain 1,949 ms vs checker 2,018 ms (+69 ms) vs tsc --noEmit 985 ms. Injected TS error: plain vite exit 0 (ships dist) x3; checker exit 2 x3; tsc exit 2 x3. Fixture 122 modules.
Hands-on6 Oct 20265 min read