Skip to content
PluginStats

babel-plugin-module-resolver weekly downloads statistics

By tleunen (2 listings) · npm · Babel plugins

Module resolver plugin for Babel

View on npm Fresh · Dec 6, 2026

babel-plugin-module-resolver has 5,602,781 recorded weekly downloads on npm, an increase of 5.6% over the past 30 days, ranking #159 of 3,247 tracked listings.

Weekly downloads
5,602,781
Official API · Dec 5, 2026
7-day growth
+10.2%
+519.1K weekly downloads
30-day growth
+5.6%
+297.6K weekly downloads
90-day growth
+44.5%
+1.7M weekly downloads
Rank
#159
▲ 1 in 7 days

About babel-plugin-module-resolver

babel-plugin-module-resolver

Maintenance Status NPM version [![Build Status Linux][circleci-image]][circleci-url] [![Build Status Windows][appveyor-image]][appveyor-url] [![Coverage Status][coverage-image]][coverage-url]

A Babel plugin to add a new resolver for your modules when compiling your code using Babel. This plugin allows you to add new "root" directories that contain your modules. It also allows you to setup a custom alias for directories, specific files, or even other npm modules.

Description

This plugin can simplify the require/import paths in your project. For example, instead of using complex relative paths like ../../../../utils/my-utils, you can write utils/my-utils. It will allow you to work faster since you won't need to calculate how many levels of directory you have to go up before accessing the file.

// Use this:
import MyUtilFn from 'utils/MyUtilFn';
// Instead of that:
import MyUtilFn from '../../../../utils/MyUtilFn';

// And it also work with require calls
// Use this:
const MyUtilFn = require('utils/MyUtilFn');
// Instead of that:
const MyUtilFn = require('../../../../utils/MyUtilFn');

Getting started

Install the plugin

npm install --save-dev babel-plugin-module-resolver

or

yarn add --dev babel-plugin-module-resolver

Specify the plugin in your .babelrc with the custom root or alias. Here's an example:

{
  "plugins": [
    ["module-resolver", {
      "root": ["./src"],
      "alias": {
        "test": "./test",
        "underscore": "lodash"
      }
    }]
  ]
}

.babelrc.js version Specify the plugin in your .babelrc.js file with the custom root or alias. Here's an example:


const plugins = [
  [
    require.resolve('babel-plugin-module-resolver'),
    {
      root: ["./src/"],
      alias: {
        "test": "./test"
      }
    }

  ]

];

Good example: // https://gist.github.com/nodkz/41e189ff22325a27fe6a5ca81df2cb91

Documentation

babel-plugin-module-resolver can be configured and controlled easily, check the documentation for more details

Are you a plugin author (e.g. IDE integration)? We have documented the exposed functions for use in your plugins!

ESLint plugin

If you're using ESLint, you should use [eslint-plugin-import][eslint-plugin-import], and [eslint-import-resolver-babel-module][eslint-import-resolver-babel-module] to remove falsy unresolved modules. If you want to have warnings when aliased modules are being imported by their relative paths, you can use eslint-plugin-module-resolver.

Editors autocompletion

  • Atom: Uses [atom-autocomplete-modules][atom-autocomplete-modules] and enable the babel-plugin-module-resolver option.
  • VS Code: Configure the path mapping in jsconfig.json (tsconfig.json for TypeScript), e.g.:
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "*": ["src/*"],
      "test/*": ["test/*"],
      "underscore": ["lodash"]
    }
  }
}
  • IntelliJ/WebStorm: You can mark your module directories as "resources root" e.g if you have ../../../utils/MyUtilFn you can mark ../../../utils as "resources root". This has the problem that your alias also has to be named utils. The second option is to add a webpack.config.js to your project and use it under File->Settings->Languages&Frameworks->JavaScript->Webpack. This will trick webstorm into resolving the paths and you can use any alias you want e.g.:
var path = require('path');

module.exports = {
  resolve: {
    extensions: ['.js', '.json', '.vue'],
    alias: {
      utils: path.resolve(__dirname, '../../../utils/MyUtilFn'),
    },
  },
};

License

MIT, see LICENSE.md for details.

Who is using babel-plugin-module-resolver ?

Are you also using it? Send a PR!

Description from the npm listing.

  • babel
  • babel-plugin
  • module
  • resolver
  • alias
  • rewrite
  • resolve
  • rename
  • mapping
  • require
  • import

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-module-resolver weekly downloads on npm, last 90 days: 5,602,781 weekly downloads as of Dec 5, 2026, +44.5% over 90 days.babel-plugin-module-resolverWeekly downloads on npm · Last 90 days5,602,781downloads / week+44.5% over 90 days01M2M3M4M5M6MSep 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-module-resolver weekly downloads on npm, last 90 days: 5,602,781 weekly downloads as of Dec 5, 2026, +44.5% over 90 days.

7/30/90-day growth

babel-plugin-module-resolver weekly downloads growth on npm: +10.2% over 7 days, +5.6% over 30 days, +44.5% over 90 days.babel-plugin-module-resolverWeekly downloads growth on npm5,602,781downloads / week now7-day growth+519,145 weekly downloads+10.2%30-day growth+297,611 weekly downloads+5.6%90-day growth+1,725,614 weekly downlo…+44.5%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
babel-plugin-module-resolver weekly downloads growth on npm: +10.2% over 7 days, +5.6% over 30 days, +44.5% over 90 days.

Ranking history

babel-plugin-module-resolver npm ranking history: currently #159 (by weekly downloads).babel-plugin-module-resolvernpm ranking · by weekly downloads · Last 90 days#159current rank#154#156#158#160#162Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
babel-plugin-module-resolver npm ranking history: currently #159 (by weekly downloads).

Listing placement

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

Listing placement

Babel plugins263 listings · 14 pages · page 6, #13 (overall #113)
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 (170)
Recent weekly downloads observations for babel-plugin-module-resolver
Date (UTC)Weekly downloadsChange vs. previous
5,602,781+27.1K
5,575,641+191.1K
5,384,515+190.5K
5,193,966+89.7K
5,104,269+40.3K
5,063,953+1.8K
5,062,142-21.5K
5,083,636-39.5K
5,123,103-142.9K
5,266,052-202.8K
5,468,807-125.9K
5,594,660-54.4K
5,649,051-19K
5,668,043—

Similar npm Babel plugins plugins

All 20 babel-plugin-module-resolver 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-module-resolver. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.