Skip to content
PluginStats

@regru/webpack-babel-multi-target-plugin weekly downloads statistics

By regru · npm · Webpack plugins

A Webpack plugin that works with Babel to allow deployment of ES2015 builds targeted to modern browsers, with an ES5 fallback for legacy browsers.

View on npm Fresh · Oct 28, 2026

@regru/webpack-babel-multi-target-plugin has 4 recorded weekly downloads on npm, ranking #2080 of 2,644 tracked listings.

Weekly downloads
4
Official API · Oct 26, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#2080
Among tracked npm listings

About @regru/webpack-babel-multi-target-plugin

webpack-babel-multi-target-plugin

BrowserStack Status Build Status

This project, inspired by Phil Walton's article Deploying es2015 Code in Production Today, adds tooling to simplify the additional configuration with a Webpack plugin, BabelMultiTargetPlugin.

Setup and Configuration

NPM

Using the plugin requires making a few small changes to your existing webpack configuration:

  • Replace any instances of 'babel-loader' with BabelMultiTargetPlugin.loader()

    • Do not use a Loader configuration object here - see Options Reference below for information on customizing options for 'babel-loader'
  • Set resolve.mainFields to favor modern ES modules, which allows webpack to load the most modern source possible. There are several intersecting de-facto standards flying around, so this should cover as much as possible:

mainFields: [

  // rxjs and Angular Package Format
  // these are generally shipped as a higher ES language level than `module`
  'es2015',
  'esm2015',
  'fesm2015',

  // current leading de-facto standard - see https://github.com/rollup/rollup/wiki/pkg.module
  'module',

  // previous de-facto standard, superceded by `module`, but still in use by some packages
  'jsnext:main',

  // Angular Package Format - lower ES level
  'esm5',
  'fesm5',

  // standard package.json fields
  'browser',
  'main',
],
  • Add an instance of BabelMultiTargetPlugin to the webpack configuration's plugins property

  • BabelMultiTargetPlugin does not require any configuration - but can be customized (see Options Reference below)

  • Remove any .babelrc - see Options Reference below for setting preset options

  • Remove any references to babel-loader from your package.json - it is a direct dependency of webpack-babel-multi-target-plugin, and may cause unexpected issues if there are duplicate instances due to a version mismatch

  • TypeScript

    • Loader rules must use BabelMultiTargetPlugin.loader() after your compiler loader (remember, loaders are run bottom to top)
    • Set tsconfig to target es6 or higher
  • Vue

    • Replace 'vue-loader' with BabelMultiTargetPlugin.loader('vue-loader')

Upgrading from v1.x

  • Change usages of BabelMultiTargetPlugin.loader to BabelMultiTargetPlugin.loader()

Usage with ES6 Dynamic Imports (including Angular "Lazy" Routes)

When using ES6's import(...) syntax, you may use Webpack's built-in chunk naming syntax to control the naming of the resulting chunk:

import(/* webpackChunkName: "my-dynamic-import" */'./some-other-module')

When working with imports that use an expression within the import syntax, BabelMultiTargetPlugin adds the [resource] tag to allow better control over the naming of the resulting chunk. The [resource] tag will be replaced by the relative path of the imported module, minus the file extension.

/*
 * ./src/
 *   - plugins
 *     - a
 *       plugin.js
*      - b
*        plugin.js
 *  
 */

// ./src/loader.js
import(/* webpackChunkName: "[resource]" */`./plugins/${plugin}/plugin.js`)

In the above example, the resulting chunks for the plugin files would be (depending on the target configuration):

  • a-plugin.js (legacy bundle for ./src/plugins/a/plugin.js)
  • a-plugin.modern.js (modern bundle for ./src/plugins/a/plugin.js)
  • b-plugin.js (legacy bundle for ./src/plugins/b/plugin.js)
  • b-plugin.modern.js (modern bundle for ./src/plugins/b/plugin.js)
Naming Angular Lazy Routes

Adding the included NamedLazyChunksPlugin will allow similar human-friendly chunk naming for Angular lazy routes:

// webpack.config.js

const BabelMultiTargetPlugin = require('webpack-babel-multi-target-plugin').BabelMultiTargetPlugin
const NamedLazyChunksPlugin =  require('webpack-babel-multi-target-plugin').NamedLazyChunksPlugin

module.exports = {
  ...
  
  plugins: [
    new BabelMultiTargetPlugin(),
    new NamedLazyChunksPlugin(),
  ],
}

NamedLazyChunkPlugin can also be used with plain ES6 Dynamic Imports as an alternative to Webpack's chunk naming syntax.

Configuration Defaults

BabelMultiTargetPlugin does not require any options to be set. The default behavior is:

  • Generate "modern" and "legacy" bundles.

  • The "modern" bundle assets will have their filenames appended with .modern, while the "legacy" bundle assets will remain the same. This enables these assets to be deployed without breaking anything since it will still have the required polyfills.

  • "modern" browsers are the last 2 versions of each browser, excluding versions that don't support <script type="module">

Options Reference…

Description from the npm listing.

  • webpack
  • webpack-plugin
  • babel
  • babel-loader
  • esnext
  • esmodules
  • es2015
  • es2016
  • es2017
  • es6
  • es7

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

@regru/webpack-babel-multi-target-plugin weekly downloads on npm, last 90 days: 4 weekly downloads as of Oct 26, 2026.@regru/webpack-babel-multi-target-plug…Weekly downloads on npm · Last 90 days4downloads / week3.63.844.24.4Jul 28Aug 12Aug 27Sep 11Sep 26Oct 11Oct 26downloads / weekOct 26, 2026 – Oct 26, 2026 · 1 observations · Updated Oct 26, 2026pluginstats.com
@regru/webpack-babel-multi-target-plugin weekly downloads on npm, last 90 days: 4 weekly downloads as of Oct 26, 2026.

7/30/90-day growth

@regru/webpack-babel-multi-target-plugin weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.@regru/webpack-babel-multi-target-plug…Weekly downloads growth on npm4downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 26, 2026pluginstats.com
@regru/webpack-babel-multi-target-plugin weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@regru/webpack-babel-multi-target-plugin npm ranking history: currently #2080 (by weekly downloads).@regru/webpack-babel-multi-target-plug…npm ranking · by weekly downloads · Last 90 days#2080current rank#2078#2079#2080#2081#2082Jul 30Aug 14Aug 29Sep 13Sep 28Oct 13Oct 28rankOct 28, 2026 – Oct 28, 2026 · 1 observations · Updated Oct 26, 2026pluginstats.com
@regru/webpack-babel-multi-target-plugin npm ranking history: currently #2080 (by weekly downloads).

Listing placement

All npm2,642 listings · 133 pages · 1,323 shown · page 125, #6 (overall #2,486)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins279 listings · 14 pages · page 13, #13 (overall #253)
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 (1)
Recent weekly downloads observations for @regru/webpack-babel-multi-target-plugin
Date (UTC)Weekly downloadsChange vs. previous
4—

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/@regru/webpack-babel-multi-target-plugin. First seen Oct 28, 2026; last successful collection Oct 28, 2026. See the methodology.