unplugin-auto-import is a build plugin that automatically imports APIs on-demand across Vite, Webpack, and Rollup.
The tool solves the friction of manually importing utilities, composables, and other APIs throughout a codebase. Rather than requiring developers to write import statements at the top of each file, unplugin-auto-import detects usage of specified APIs and injects the necessary imports during the build process. This approach works by scanning code for references to configured imports and transforming the output to include them automatically, eliminating boilerplate while keeping imports explicit in the final bundle.
The tool suits projects that rely heavily on utility libraries or composable patterns, particularly Vue applications and other frameworks where importing the same set of helpers repeatedly becomes tedious. It works across the three major bundlers in the JavaScript ecosystem, making it valuable whether your project uses Vite, Webpack, or Rollup. Teams should adopt it when they have a stable set of frequently-used APIs they want available without explicit imports, though it requires upfront configuration to specify which modules and exports should be auto-imported.
The project shows consistent maintenance with regular updates addressing both new features and bug fixes. Pull requests receive timely review and merging, indicating active engagement with contributions. Issues are addressed promptly, demonstrating responsiveness to user-reported problems. The codebase maintains a focus on supporting all three target bundlers equally, with changes typically tested across the full matrix of supported tools.