fwouts / previewjs

Preview UI components in your IDE instantly
https://previewjs.com
Other
1.83k stars 44 forks source link

fix: remove Node polyfill by default #2593

Open fwouts opened 5 months ago

fwouts commented 5 months ago

This doesn't make sense in normal codebases where we try to detect whether we're in a Node or browser environment. It can be added back with a simple Vite config such as:

import { polyfillNode } from "esbuild-plugin-polyfill-node";

export default {
  optimizeDeps: {
    plugins: [polyfillNode()],
  }
}