node-polyfill-webpack-plugin weekly downloads statistics
By Richienb · npm · Webpack plugins
Polyfill Node.js core modules in Webpack.
node-polyfill-webpack-plugin has 1,795,901 recorded weekly downloads on npm, a decrease of 40.5% over the past 30 days, ranking #167 of 2,391 tracked listings.
About node-polyfill-webpack-plugin
node-polyfill-webpack-plugin
Polyfill Node.js core modules in Webpack.
This module is only needed for Webpack 5+.
Install
npm install node-polyfill-webpack-plugin
Usage
Add the following to your webpack.config.js:
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
module.exports = {
// Other rules...
plugins: [
new NodePolyfillPlugin(),
],
};
console, process, and most deprecated/internal Node.js core modules are not polyfilled by default. If you still need to polyfill them, you can use the additionalAliases option:
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
module.exports = {
// Other rules...
plugins: [
new NodePolyfillPlugin({
additionalAliases: ['process', 'punycode'],
}),
],
};
The fs module resolves to nothing because its functionality cannot replicated in the browser.
API
new NodePolyfillPlugin(options?)
options
Type: object
onlyAliases is mutually exclusive with excludeAliases and additionalAliases.
excludeAliases
If you don't want a module to be polyfilled, you can specify aliases to be skipped here.
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
module.exports = {
// Other rules...
plugins: [
new NodePolyfillPlugin({
excludeAliases: ['console'],
}),
],
};
additionalAliases
Alternatively, you can choose to add certain aliases to the list of polyfilled modules. For example, you can choose to polyfill console.
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
module.exports = {
// Other rules...
plugins: [
new NodePolyfillPlugin({
additionalAliases: ['console'],
}),
],
};
onlyAliases
You can also choose to only include certain aliases, ignoring the defaults. For example, you can have only console polyfilled.
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
module.exports = {
// Other rules...
plugins: [
new NodePolyfillPlugin({
onlyAliases: ['console'],
}),
],
};
Aliases
Globals
Bufferconsoleprocess
Modules
assertbufferconsoleconstantscryptodomaineventshttphttpsospathpunycodeprocessquerystringstream_stream_duplex_stream_passthrough_stream_readable_stream_transform_stream_writablestring_decodersystimersttyurlutilvmzlib
Description from the npm listing.
- webpack
- webpack-plugin
- node
- polyfill
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
7/30/90-day growth
Ranking history
Listing placement
Listing placement
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)Similar npm Webpack plugins plugins
All 20 node-polyfill-webpack-plugin alternativesData 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/node-polyfill-webpack-plugin. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.