davidmyersdev / vite-plugin-node-polyfills

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

Plugin not working with Svelte #34

Closed aryzing closed 1 year ago

aryzing commented 1 year ago

Just tried setting up a very vanilla Svelte app with pnpm create vite my-app --template svelte-ts and added the vite-plugin-node-polyfills to handle some libs using Node.js functionality. Seems like it's not working, Buffer is undefined.

I've created this repro to aid with debugging,

https://github.com/aryzing/repro-node-polyfill-not-working

Is the config incorrect or is it not working as expected?

davidmyersdev commented 1 year ago

Duplicate of #22 (fixed in v0.11.2). Thanks again for the reproduction!