davidmyersdev / vite-plugin-node-polyfills

A Vite plugin to polyfill Node's Core Modules for browser environments.
MIT License
263 stars 17 forks source link

Uncaught error: The "original" argument must be of type Function #42

Closed harryyaprakov closed 8 months ago

harryyaprakov commented 10 months ago

I am getting this error when using the plugin in a 'sanity' vite config: // sanity.config.ts vite: (prev: any) => ({ ...prev, plugins: [...prev.plugins, nodePolyfills()], }),

Heres the full error: Screenshot 2023-09-09 at 15 28 07

davidmyersdev commented 10 months ago

Hey there, @harryyaprakov. I'm not familiar with Sanity. Can you please provide a minimal example project that gives this error on StackBlitz or CodeSandbox?