node-polyfill-webpack-plugin-myh
v1.1.7
Published
Polyfill Node.js core modules in Webpack.
Maintainers
Readme
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-pluginUsage
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
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"]
})
]
}Aliases
Globals
Bufferconsoleprocess
Modules
assertbufferconsoleconstantscryptodomaineventshttphttpsospathpunycodeprocessquerystringstream_stream_duplex_stream_passthrough_stream_readable_stream_transform_stream_writablestring_decodersystimersttyurlutilvmzlib

