{"library":"node-polyfill-webpack-plugin","title":"node-polyfill-webpack-plugin","description":"Webpack 5 removed automatic Node.js core module polyfills, breaking many packages that rely on them. This plugin restores those polyfills (Buffer, process, crypto, path, etc.) by injecting lightweight browser-compatible implementations. Current stable version is 4.1.0, released in 2024. Requires Node >=14 and Webpack >=5. Compared to manual fallbacks or patch-package, it provides a single plugin configuration. v4 dropped several modules from defaults (console, domain, process, internal streams) and renamed includeAliases to additionalAliases. Ships TypeScript definitions.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install node-polyfill-webpack-plugin"],"cli":null},"imports":["const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');","new NodePolyfillPlugin()","const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// webpack.config.js\nconst path = require('path');\nconst NodePolyfillPlugin = require('node-polyfill-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n  },\n  plugins: [\n    new NodePolyfillPlugin()\n  ]\n};","lang":"javascript","description":"Basic webpack config that adds Node.js core module polyfills to a browser bundle.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}