Skip to content
PluginStats

asset-module-webpack-plugin weekly downloads statistics

By exponentjs · npm · Webpack plugins

A webpack plugin that emits JS modules for your assets such as images. This allows Node to load the modules that webpack generated for your assets without having to run webpack's bundle on the server.

View on npm Fresh · Dec 6, 2026

asset-module-webpack-plugin has 118 recorded weekly downloads on npm, an increase of 100% over the past 30 days, ranking #2587 of 3,247 tracked listings.

Weekly downloads
118
Official API · Dec 5, 2026
7-day growth
+53.2%
+41 weekly downloads
30-day growth
+100%
+59 weekly downloads
90-day growth
+392%
+94 weekly downloads
Rank
#2587
▼ 44 in 7 days

About asset-module-webpack-plugin

AssetModulePlugin

A webpack plugin that emits JS modules for your assets such as images. This allows Node to load the modules that webpack generated for your assets without having to run webpack's bundle on the server.

Purpose

This plugin was written to facilitate server-side rendering of React components. The traditional approach is to build two webpack bundles, one for the browser and one for the server. This works, but there a few things about it that are unappealing:

  • You need to write a second webpack config for the server-side bundle
  • The generated bundle is harder to debug and requires configuring Node to use source maps
  • Node has to read and parse the entire bundle the first time it is required, rather than lazily parsing components as needed

What we really wanted to do was run our JS files on Node directly instead of a bundle. The enhanced-require package looks like the most comprehensive solution, as it polyfills webpack for the server. However, it is unmaintained, and we needed only two features anyway: We wanted to be able to require CSS/LESS files without throwing an error, and we wanted require('./icon.png') to return the full CDN path to the icon. My goal was for this code to run:

import './Button.less';

class Button extends React.Component {
  render() {
    return (
      <button className="button">
        <img src={require('./icon.png')} className="button-icon" />
        {this.props.text}
      </button>
    );
  }
}

How it works

The plugin runs after compilation and translates the path of the source asset to a destination path (you configure this with the sourceBase and destinationBase options). It then writes the full path of the asset to a file at the destination path. It emit files like this:

// build/icon.png
// It's actually a JS module with a png extension, which Node can evaluate. The
// full asset path is derived from the public path and asset's relative path.
module.exports = "http://static.example.com/eelZITCY0q9Gbj00z8HI.png";

How to use it

In your webpack configuration file, add this to your list of plugins:

new AssetModulePlugin({
  sourceBase: path.join(__dirname, 'src'),
  destinationBase: path.join(__dirname, 'build'),
  test: /\.(?!js)$/,
  exclude: /node_modules/,
  fileSystems: [AssetModulePlugin.DefaultFileSystem, require('fs')],
})

This takes your assets whose filenames don't end in ".js" and aren't under "node_modules" and moves them from "src" to "build". The original asset's path relative to "src" will be the same as the emitted module's path relative to "build".

Requirements

We use the class keyword so io.js 2.0+ is required.

Ideas

If you have ideas for how to improve server-side rendering we'd be happy to chat. Open up a GitHub issue or join our Slack chat at http://exp.host/community.

Contributing

Run npm run-script build to build lib from src.

Description from the npm listing.

  • webpack
  • webpack-plugin
  • assets
  • server-side-rendering

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

asset-module-webpack-plugin weekly downloads on npm, last 90 days: 118 weekly downloads as of Dec 5, 2026, +392% over 90 days.asset-module-webpack-pluginWeekly downloads on npm · Last 90 days118downloads / week+392% over 90 days020406080100120140160Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
asset-module-webpack-plugin weekly downloads on npm, last 90 days: 118 weekly downloads as of Dec 5, 2026, +392% over 90 days.

7/30/90-day growth

asset-module-webpack-plugin weekly downloads growth on npm: +53.2% over 7 days, +100% over 30 days, +392% over 90 days.asset-module-webpack-pluginWeekly downloads growth on npm118downloads / week now7-day growth+41 weekly downloads+53.2%30-day growth+59 weekly downloads+100%90-day growth+94 weekly downloads+392%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
asset-module-webpack-plugin weekly downloads growth on npm: +53.2% over 7 days, +100% over 30 days, +392% over 90 days.

Ranking history

asset-module-webpack-plugin npm ranking history: currently #2587 (by weekly downloads).asset-module-webpack-pluginnpm ranking · by weekly downloads · Last 90 days#2587current rank#1600#1800#2000#2200#2400#2600Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
asset-module-webpack-plugin npm ranking history: currently #2587 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 130, #7 (overall #2,587)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 9, #7 (overall #167)
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 (170)
Recent weekly downloads observations for asset-module-webpack-plugin
Date (UTC)Weekly downloadsChange vs. previous
1180
1180
118+28
90+37
53-24
77+2
75-2
77-3
80-1
81+17
64-20
84+22
62-1
63—

Similar npm Webpack plugins plugins

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