3.0.0 • Published 5 months ago

node-polyfill-webpack-plugin v3.0.0

Weekly downloads
3,775
License
MIT
Repository
github
Last release
5 months ago

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()
	]
};

API

new NodePolyfillPlugin(options?)

options

Type: object

excludeAliases and includeAliases are mutually exclusive.

excludeAliases

By default, the modules that were polyfilled in Webpack 4 are mirrored over. However, if you don't want a module like console to be polyfilled you can specify alises to be skipped here.

const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');

module.exports = {
	// Other rules...
	plugins: [
		new NodePolyfillPlugin({
			excludeAliases: ['console']
		})
	]
};

includeAliases

Alternatively, you can choose to only include certain aliases. For example, you can only have console polyfilled.

const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');

module.exports = {
	// Other rules...
	plugins: [
		new NodePolyfillPlugin({
			includeAliases: ['console']
		})
	]
};

Aliases

Globals

  • Buffer
  • console
  • process

Modules

  • assert
  • buffer
  • console
  • constants
  • crypto
  • domain
  • events
  • http
  • https
  • os
  • path
  • punycode
  • process
  • querystring
  • stream
  • _stream_duplex
  • _stream_passthrough
  • _stream_readable
  • _stream_transform
  • _stream_writable
  • string_decoder
  • sys
  • timers
  • tty
  • url
  • util
  • vm
  • zlib
@bsolution/fast@corabank/ibanking@pandev/docusaurus-plugin-panw@felvin-search-apps/async-api-validatoreventsource-ts@kurtzgmbh/front-react-appvisvamarbundles-esmuser-wxfstdh-web-ui@everything-registry/sub-chunk-2308@subwallet_connect/ledgerpolkadot@nimeshjohri/webplayer-sdkpeliculasproskommapronovix-drupal-devpronovix-frontend-toolsqc-test-demo@roq/ui-reactsingularitynet-frontend@reapit/ts-scripts@recative/ap-packremix-webpack-clirewp@r3m0t/vscode-python@radiantearth/stac-browsersilent-shard-wallet-servicerocompreact-proxy-serverreact-kickstarterreact-cli-utilityreact-cesiumgoqgtoolsprv-react-plannerreact-sdk-integration-blueprintsocial-network-tsships-manager-frontsoulswap-open-sdk@saturn-chain/web3-functionssnd-miniostac-component@shushu.pro/webpack@storybook/nextjs@storybook-extras/angular@wingsuit-designsystem/core@things-factory/builderth-minio@yokowasis/firegun@tokenrunners/plugin@x1oj0/strp-admintime-analyzerrox-react-nativerss-parser-media-thumbnailrocket-monkey-nx-electronscraiptseabug-contractsstuyutils.jstassanyi_react@sudophunk/v4-client@subwallet-connect/ledger-polkadot@textlint/script-compiler@thangha/basic-cli@toniq-labs/ext@toolbarthomas/harbortailwind-runtime-jitethwatch-clienteumevenietexperiment-report-generatoret-minio-jseko-voipeqbr-wallet-providerember-cli-ipfsdroppii-b2bfuni-mars-sdkfuni-marsmap-sdkfrontend-minio-jsforge-server-utilsfile-upload-minioflawcralibgiscoregisthreemapmaxingkeji-common-react@eelkeblok/harbormykitsmogratelt-draw-vue3jsc3d11li17webpackmodulelatejs-apphntdi-cloud-uiinfo-chat-gptinfo-chat-gpt-pckginfo-chat-gpt1imo-clientnewdashboardpackagenbiccs@equinor/echo-cli@esportsplus/webpack@felvin-search/cli@felvin-community/async-api-validator
3.0.0

5 months ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

4 years ago