Vite plugin for polyfilling Node.js built-in globals and modules ⚡️
npm install vite-plugin-ngmi-polyfillVite plugin for polyfilling Node.js built-in globals and modules ⚡️



---
Table of contents
- Reason
- Installing
- Usage
- Examples
- Included packages
- License
---
Some modules such as events or process requires polyfilling since Vite does not handle it by default (here's a search for vite browser-external errors), whereas several packages, especially web3 related ones, use these packages in order to work.
This package wraps other polyfill packages and exports a Vite plugin so you can easily import inside your vite.config.{js,ts}.
``shusing npm
npm install vite vite-plugin-ngmi-polyfill
Usage
`ts
import { defineConfig } from "vite";
import { NgmiPolyfill } from "vite-plugin-ngmi-polyfill";export default defineConfig({
plugins: [NgmiPolyfill()],
});
``- https://github.com/strangelove-ventures/graz-vite-example
- @esbuild-plugins/node-globals-polyfill
- @esbuild-plugins/node-modules-polyfill