Skip to content
PluginStats

babel-plugin-auto-import weekly downloads statistics

By PavelDymkov · npm · Babel plugins

Babel plugin for variable auto imports

View on npm Outdated · Nov 21, 2026

babel-plugin-auto-import has 63,546 recorded weekly downloads on npm, a decrease of 4.2% over the past 30 days, ranking #722 of 3,247 tracked listings.

Weekly downloads
63,546
Official API · Dec 5, 2026
7-day growth
+35.1%
+16.5K weekly downloads
30-day growth
-4.2%
-2.8K weekly downloads
90-day growth
+77.3%
+27.7K weekly downloads
Rank
#722
▲ 49 in 7 days

About babel-plugin-auto-import

babel-plugin-auto-import

Convert global variables to import statements

Examples

Example 1

.babelrc

{
  "plugins": [[
    "auto-import", {
      "declarations": [
        { "default": "React", "path": "react" }
      ]
    }
  ]]
}

In

React.createElement("div", null, []);

Out

import React from "react";

React.createElement("div", null, []);
Example 2

.babelrc

{
  "plugins": [[
    "auto-import", {
      "declarations": [
        { "default": "React", "members": ["Component"], "path": "react" }
      ]
    }
  ]]
}

In

class MyComponent extends Component { }

Out

import { Component } from "react";

class MyComponent extends Component { }
Example 3

Suitable for polyfilling browser built-ins (eg. window.fetch)

.babelrc

{
  "plugins": [[
    "auto-import", {
      "declarations": [
        { "anonymous": ["fetch"], "path": "whatwg-fetch" }
      ]
    }
  ]]
}

In

fetch("http://example.com/qwe");

Out

import "whatwg-fetch";

fetch("http://example.com/qwe");
Example 4

Generate import path by filename. [name] will be replaced to processed filename.

.babelrc

{
  "plugins": [[
    "auto-import", {
      "declarations": [
        { "default": "styles", "path": "./[name].css" }
      ]
    }
  ]]
}

In

component-name.js

// ...
<input className={styles.className} />
// ...

Out

import styles from "./component-name.css";
// ...
<input className={styles.className} />
// ...

You can process filename by "nameReplacePattern" and "nameReplaceString" options. It's processing like this:

"basename.js".replace(new RegExp(nameReplacePattern), nameReplaceString); // == [name]

By default

nameReplacePattern == "\\.js$";
nameReplaceString == "";

.babelrc

{
  "plugins": [[
    "auto-import", {
      "declarations": [
        {
          "default": "styles", "path": "./[name].css",
          "nameReplacePattern": "\.component\.js$", "nameReplaceString": ".styles"
        }
      ]
    }
  ]]
}

In

name.component.js

// ...
<input className={styles.className} />
// ...

Out

import styles from "./name.styles.css";
// ...
<input className={styles.className} />
// ...

Using with Create React App

If you don't want to eject your project, you can use react-app-rewired and customize-cra.

Follow the instructions.

config-overrides.js

const { override, addBabelPlugins, disableEsLint } = require("customize-cra");

const autoImportPluginOptions = {
    "declarations": [
        { "default": "React", members: ["Component"], "path": "react" }
    ]
};


module.exports = override(
    ...addBabelPlugins([require("babel-plugin-auto-import"), autoImportPluginOptions]),
    disableEsLint(),
);

Description from the npm listing.

  • babel-plugin
  • import
  • module

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

babel-plugin-auto-import weekly downloads on npm, last 90 days: 63,546 weekly downloads as of Dec 5, 2026, +77.3% over 90 days.babel-plugin-auto-importWeekly downloads on npm · Last 90 days63,546downloads / week+77.3% over 90 days020K40K60K80K100KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
babel-plugin-auto-import weekly downloads on npm, last 90 days: 63,546 weekly downloads as of Dec 5, 2026, +77.3% over 90 days.

7/30/90-day growth

babel-plugin-auto-import weekly downloads growth on npm: +35.1% over 7 days, -4.2% over 30 days, +77.3% over 90 days.babel-plugin-auto-importWeekly downloads growth on npm63,546downloads / week now7-day growth+16,505 weekly downloads+35.1%30-day growth-2,766 weekly downloads-4.2%90-day growth+27,705 weekly downloads+77.3%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
babel-plugin-auto-import weekly downloads growth on npm: +35.1% over 7 days, -4.2% over 30 days, +77.3% over 90 days.

Ranking history

babel-plugin-auto-import npm ranking history: currently #722 (by weekly downloads).babel-plugin-auto-importnpm ranking · by weekly downloads · Last 90 days#722current rank#660#680#700#720#740#760#780Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankNov 21, 2026 – Dec 6, 2026 · 8 observations · Updated Dec 5, 2026pluginstats.com
babel-plugin-auto-import npm ranking history: currently #722 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 37, #2 (overall #722)
All npm: every listing in weekly downloads order

Listing placement

Babel plugins263 listings · 14 pages · page 13, #9 (overall #249)
Babel 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 (135)
Recent weekly downloads observations for babel-plugin-auto-import
Date (UTC)Weekly downloadsChange vs. previous
63,546-4.3K
67,878+10.3K
57,534+7K
50,573-111
50,684+310
50,374+4.1K
46,302-739
47,041-731
47,772-3.2K
50,933-3.5K
54,414-7.7K
62,083-3.3K
65,391-6.3K
71,659—

Similar npm Babel plugins plugins

All 20 babel-plugin-auto-import 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/babel-plugin-auto-import. First seen Nov 21, 2026; last successful collection Nov 21, 2026. See the methodology.