Auto-import APIs on-demand for Vite, Webpack, Rollup, Rspack, and esbuild with full TypeScript support.
unplugin-auto-import is a build tool plugin that automatically imports APIs from libraries like Vue, React, and VueUse into your code, eliminating manual import statements. It works with Vite, Webpack, Rollup, Rspack, and esbuild, providing full TypeScript support and reducing boilerplate while keeping bundles tree-shakable.
Frontend developers using modern JavaScript frameworks (Vue, React, Svelte) who want to reduce import boilerplate in projects built with Vite, Webpack, Rollup, or similar bundlers.
It offers a unified, configurable solution for auto-imports across multiple bundlers, with excellent TypeScript integration and framework flexibility, unlike runtime-based alternatives or bundler-specific plugins.
Auto import APIs on-demand for Vite, Webpack and Rollup
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Vite, Webpack, Rollup, Rspack, and esbuild, along with frameworks like Astro and Quasar, ensuring flexibility across most modern build setups without vendor lock-in.
Automatically generates .d.ts files for auto-imported APIs, providing full type hints and safe refactoring in IDEs, as emphasized in the TypeScript integration section.
Works with Vue, React, Svelte, and others via customizable import rules, making it versatile for diverse frontend projects without framework-specific constraints.
Imports only the APIs actually used in code, maintaining optimal bundle sizes by leveraging the underlying bundler's tree-shaking capabilities.
Relies on integration with specific bundlers, adding setup complexity and potential toolchain issues compared to runtime alternatives like vue-global-api, as noted in the FAQ.
With over 20 configuration options, including presets, ESLint/Biome setup, and directory scanning, initial configuration can be daunting for simple or small-scale projects.
Only includes presets for popular packages; less common libraries require manual dev dependency installation and configuration, increasing maintenance effort.