awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
antfu avatar

antfu/unplugin-auto-import

0
View on GitHub↗
3,786 stars·217 forks·TypeScript·MIT·19 views

Unplugin Auto Import

unplugin-auto-import is a build-time import automation plugin and AST-based code transformer. It analyzes source code to identify missing identifiers and automatically injects the required import statements during the bundling process.

The project functions as a cross-bundler build plugin, providing a unified abstraction layer that ensures consistent behavior across Vite, Webpack, and Rollup. It utilizes a pattern-based module resolver to scan local directories via glob patterns and employs a TypeScript declaration generator to maintain type definition files for IDE autocompletion.

Its capability surface includes automated import management through predefined API presets and local module discovery for components and utilities. It also handles linting configuration automation by synchronizing auto-imported globals with tools like ESLint to prevent undefined variable errors during static analysis.

Features

  • Automatic Import Injections - Automatically injects required import declarations into source files during the build process to eliminate manual imports.
  • Build Tools and Bundlers - Integrates with various bundlers to automate dependency management and source code transformation.
  • AST-Based Source Transformations - Modifies source code by replacing or adding nodes in the abstract syntax tree to resolve missing identifiers.
  • Cross-Build-Tool Plugins - Provides a single plugin API that abstracts over multiple build tools like Vite, Rollup, and Webpack.
  • AST-Based Source Injections - Implements automated modification of the abstract syntax tree to inject required import statements during the build process.
  • Import Statement Resolution - Automates the identification and generation of import statements based on used identifiers in the source code.
  • Cross-Bundler Plugin Abstractions - Provides a unified abstraction layer ensuring consistent behavior across Vite, Webpack, and Rollup.
  • Syntax Tree Transformers - Parses source code into a structural tree to identify missing identifiers and inject import statements.
  • Build-Time Auto-Import Resolvers - Analyzes source code to automatically inject missing import statements during the bundling process.
  • Source Code Export Discovery - Scans specified local folders and glob patterns to detect and automatically import available functions and types.
  • Module Discovery - Scans local directories via glob patterns to identify and register available exports for automatic inclusion.
  • Glob Pattern Resolvers - Implements glob pattern resolution to scan local directories and identify modules for automatic import registration.
  • Linting Configurations - Syncs auto-imported globals with linting tools to prevent false-positive undefined variable errors.
  • TypeScript Declaration Generators - Automatically produces .d.ts type definition files to enable IDE autocompletion for dynamically injected global variables.
  • Auto-Import Type Declarations - Generates declaration files to provide accurate type checking and editor suggestions for auto-imported functions.
  • Build Optimization - Streamlines the development experience by automating dependency resolution and module injection during the build.
  • Virtual Modules - Intercepts import requests to provide dynamically generated code content that does not exist as physical files.
  • Linter Global Variable Definitions - Registers custom global identifiers to prevent undefined-variable warnings in static analysis tools.
  • API Preset Mappings - Uses predefined configuration lists to map common library functions to their corresponding module import paths.
  • Glob-Based Module Discovery - Uses glob matching to scan the local filesystem and register available exports for the project dependency graph.
  • Local Plugin Discovery - Scans local filesystem paths using glob patterns to find and load local components and utilities.
  • Import Presets - Maps common library functions to global imports using predefined presets or custom package configurations.
  • Auto-Import Global Definitions - Generates configuration that defines auto-imported APIs as globals to prevent false-positive linting errors.
  • Development Helpers - On-demand API auto-importing for cleaner code.

Star history

Star history chart for antfu/unplugin-auto-importStar history chart for antfu/unplugin-auto-import

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Unplugin Auto Import

Similar open-source projects, ranked by how many features they share with Unplugin Auto Import.
  • unplugin/unplugin-auto-importunplugin avatar

    unplugin/unplugin-auto-import

    3,786View on GitHub↗

    unplugin-auto-import is a JavaScript auto-import plugin designed to eliminate the need for manual import statements in JavaScript and TypeScript projects. It identifies and registers modules to automatically inject necessary dependencies during the build process. The project utilizes a unified bundler plugin interface to provide consistent transformation logic across Vite, Webpack, and Rollup environments. It includes a TypeScript declaration generator to produce type definition files for auto-imported identifiers, ensuring IDE autocompletion and type checking. Additionally, it provides a sta

    TypeScriptrollup-pluginunpluginvite-plugin
    View on GitHub↗3,786
  • antfu/unplugin-vue-componentsantfu avatar

    antfu/unplugin-vue-components

    4,288View on GitHub↗

    unplugin-vue-components is a build tool that automatically injects import and registration statements for Vue components based on their usage in templates. It functions as a framework-agnostic plugin compatible with multiple build tools, including Vite, Webpack, and Rollup. The project provides automated resolution for components from external UI libraries and supports directory-based namespacing to organize elements by folder. To maintain developer experience, it includes a type generator that creates TypeScript declaration files for components imported at build time. Additional capabilitie

    TypeScript
    View on GitHub↗4,288
  • rollup/pluginsrollup avatar

    rollup/plugins

    3,750View on GitHub↗

    This is a collection of official extensions for the Rollup bundling process. These plugins serve as module transformers, resolution managers, and bundle optimizers designed to modify how JavaScript modules are processed, resolved, and optimized. The suite provides specialized capabilities for modern web transpilation, converting TypeScript, JSX, Flow, and GraphQL into compatible JavaScript. It distinguishes itself through extensive non-JavaScript asset integration, allowing the import of JSON, YAML, CSV, and image files as JavaScript modules or data URIs, and providing support for bundling We

    JavaScriptpluginsrolluprollup-plugins
    View on GitHub↗3,750
  • farm-fe/farmfarm-fe avatar

    farm-fe/farm

    5,580View on GitHub↗

    Farm is a Rust-based web build tool and development server that compiles JavaScript, TypeScript, CSS, HTML, and static assets into optimized bundles. It uses a module-graph-based bundling approach with persistent module-level caching, enabling near-instant builds and sub-20ms hot module replacement during development. The tool processes assets based on file extensions, handling CSS, Sass, Less, PostCSS, HTML, and images as first-class modules without requiring JavaScript transformation. Farm distinguishes itself through its Vite-compatible plugin system, accepting Vite, Rollup, and Unplugin p

    Rustbuild-toolbundlercompiler
    View on GitHub↗5,580
See all 30 alternatives to Unplugin Auto Import→

Frequently asked questions

What does antfu/unplugin-auto-import do?

unplugin-auto-import is a build-time import automation plugin and AST-based code transformer. It analyzes source code to identify missing identifiers and automatically injects the required import statements during the bundling process.

What are the main features of antfu/unplugin-auto-import?

The main features of antfu/unplugin-auto-import are: Automatic Import Injections, Build Tools and Bundlers, AST-Based Source Transformations, Cross-Build-Tool Plugins, AST-Based Source Injections, Import Statement Resolution, Cross-Bundler Plugin Abstractions, Syntax Tree Transformers.

What are some open-source alternatives to antfu/unplugin-auto-import?

Open-source alternatives to antfu/unplugin-auto-import include: unplugin/unplugin-auto-import — unplugin-auto-import is a JavaScript auto-import plugin designed to eliminate the need for manual import statements in… antfu/unplugin-vue-components — unplugin-vue-components is a build tool that automatically injects import and registration statements for Vue… rollup/plugins — This is a collection of official extensions for the Rollup bundling process. These plugins serve as module… farm-fe/farm — Farm is a Rust-based web build tool and development server that compiles JavaScript, TypeScript, CSS, HTML, and static… benjamn/recast — Recast is a JavaScript AST parser and printer designed for automated code refactoring. It converts source code into… airbnb/ts-migrate — ts-migrate is an automated migration tool designed to transform JavaScript source code into compiling TypeScript…