Skip to content
PluginStats

unplugin-auto-import-api weekly downloads statistics

By elonehoo · npm · Webpack plugins

Auto import APIs on-demand for Vite, Webpack and Rollup

View on npm Fresh · Oct 18, 2026

unplugin-auto-import-api has 10 recorded weekly downloads on npm, a decrease of 60.0% over the past 30 days, ranking #2065 of 2,322 tracked listings.

Weekly downloads
10
Official API · Oct 18, 2026
7-day growth
-56.5%
-13 weekly downloads
30-day growth
-60.0%
-15 weekly downloads
90-day growth
-98.8%
-804 weekly downloads
Rank
#2065
Among tracked npm listings

About unplugin-auto-import-api

unplugin-auto-import-api

NPM version

Auto import APIs on-demand for Vite, Webpack and Rollup


without

import { computed, ref } from 'vue'
const count = ref(0)
const doubled = computed(() => count.value * 2)

with

const count = ref(0)
const doubled = computed(() => count.value * 2)

Install

npm i -D unplugin-auto-import-api
<details> <summary>Vite</summary><br>
// vite.config.ts
import AutoImport from 'unplugin-auto-import-api/vite'

export default defineConfig({
  plugins: [
    AutoImport({ /* options */ }),
  ],
})

Example: playground/

<br></details>

<details> <summary>Rollup</summary><br>
// rollup.config.js
import AutoImport from 'unplugin-auto-import-api/rollup'

export default {
  plugins: [
    AutoImport({ /* options */ }),
    // other plugins
  ],
}

<br></details>

<details> <summary>Webpack</summary><br>
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('unplugin-auto-import-api/webpack')({ /* options */ }),
  ],
}

<br></details>

<details> <summary>Nuxt</summary><br>

You don't need this plugin for Nuxt, it's already builtin.

<br></details>

<details> <summary>Vue CLI</summary><br>
// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('unplugin-auto-import-api/webpack')({ /* options */ }),
    ],
  },
}

<br></details>

<details> <summary>Quasar</summary><br>
// quasar.conf.js [Vite]
module.exports = {
  vitePlugins: [
    ['unplugin-auto-import-api/vite', { /* options */ }],
  ],
}
// quasar.conf.js [Webpack]
const AutoImportPlugin = require('unplugin-auto-import-api/webpack')

module.exports = {
  build: {
    chainWebpack(chain) {
      chain.plugin('unplugin-auto-import-api').use(
        AutoImportPlugin({ /* options */ }),
      )
    },
  },
}

<br></details>

<details> <summary>esbuild</summary><br>
// esbuild.config.js
import { build } from 'esbuild'

build({
  /* ... */
  plugins: [
    require('unplugin-auto-import-api/esbuild')({
      /* options */
    }),
  ],
})

<br></details>

<details> <summary>Astro</summary><br>
// astro.config.mjs
import AutoImport from 'unplugin-auto-import-api/astro'

export default defineConfig({
  integrations: [
    AutoImport({
      /* options */
    })
  ],
})

<br></details>

Configuration

AutoImport({
  // targets to transform
  include: [
    /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
    /\.vue$/, /\.vue\?vue/, // .vue
    /\.md$/, // .md
  ],

  // global imports to register
  imports: [
    // presets
    'vue',
    'vue-router',
    // custom
    {
      '@vueuse/core': [
        // named imports
        'useMouse', // import { useMouse } from '@vueuse/core',
        // alias
        ['useFetch', 'useMyFetch'], // import { useFetch as useMyFetch } from '@vueuse/core',
      ],
      'axios': [
        // default imports
        ['default', 'axios'], // import { default as axios } from 'axios',
      ],
      '[package-name]': [
        '[import-names]',
        // alias
        ['[from]', '[alias]'],
      ],
    },
  ],
  // Enable auto import by filename for default module exports under directories
  defaultExportByFilename: false,

  // Auto import for module exports under directories
  // by default it only scan one level of modules under the directory
  dirs: [
    // './hooks',
    // './composables' // only root modules
    // './composables/**', // all nested modules
    // ...
  ],

  // Filepath to generate corresponding .d.ts file.
  // Defaults to './auto-imports.d.ts' when `typescript` is installed locally.
  // Set `false` to disable.
  dts: './auto-imports.d.ts',

  // Auto import inside Vue template
  // see https://github.com/unjs/unimport/pull/15 and https://github.com/unjs/unimport/pull/72
  vueTemplate: false,

  // Custom resolvers, compatible with `unplugin-vue-components`
  // see https://github.com/antfu/unplugin-auto-import/pull/23/
  resolvers: [
    /* ... */
  ],

  // Generate corresponding .eslintrc-auto-import.json file.
  // eslint globals Docs - https://eslint.org/docs/user-guide/configuring/language-options#specifying-globals
  eslintrc: {
    enabled: false, // Default `false`
    filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
    globalsPropValue: true, // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
  },
})

Refer to the type definitions for more options.

TypeScript

In order to properly hint types for auto-imported APIs

<table> <tr> <td width="400px" valign="top">
  1. Enable options.dts so that auto-imports.d.ts file is automatically generated
  2. Make sure auto-imports.d.ts is not excluded in tsconfig.json
</td> <td width="600px"><br>
AutoImport({
  dts: true // or a custom path
})
</td> </tr> </table>

License

MIT License © 2023 Elone Hoo

Description from the npm listing.

  • unplugin
  • vite-plugin
  • webpack-plugin
  • esbuild-plugin
  • rollup-plugin
  • astro-plugin

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

unplugin-auto-import-api weekly downloads on npm, last 90 days: 10 weekly downloads as of Oct 18, 2026, -98.8% over 90 days.unplugin-auto-import-apiWeekly downloads on npm · Last 90 days10downloads / week-98.8% over 90 days0200400600800Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
unplugin-auto-import-api weekly downloads on npm, last 90 days: 10 weekly downloads as of Oct 18, 2026, -98.8% over 90 days.

7/30/90-day growth

unplugin-auto-import-api weekly downloads growth on npm: -56.5% over 7 days, -60.0% over 30 days, -98.8% over 90 days.unplugin-auto-import-apiWeekly downloads growth on npm10downloads / week now7-day growth-13 weekly downloads-56.5%30-day growth-15 weekly downloads-60.0%90-day growth-804 weekly downloads-98.8%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
unplugin-auto-import-api weekly downloads growth on npm: -56.5% over 7 days, -60.0% over 30 days, -98.8% over 90 days.

Ranking history

unplugin-auto-import-api npm ranking history: currently #2065 (by weekly downloads).unplugin-auto-import-apinpm ranking · by weekly downloads · Last 90 days#2065current rank#600#800#1000#1200#1400#1600#1800#2000#2200Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 17, 2026 – Oct 20, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
unplugin-auto-import-api npm ranking history: currently #2065 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,161 shown · page 104, #9 (overall #2,069)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins251 listings · 13 pages · page 11, #19 (overall #219)
Webpack plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (544)
Recent weekly downloads observations for unplugin-auto-import-api
Date (UTC)Weekly downloadsChange vs. previous
10+3
7-1
8+2
60
6-3
90
9-14
23-4
270
27-5
32-13
45-1
46-7
53—

Similar npm Webpack plugins plugins

All 20 unplugin-auto-import-api alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/unplugin-auto-import-api. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.