Summary
When using the upcoming version of Vite (either the vite-rolldown package, or the Vite 8 beta package) I get a runtime error in apps that use vite-plugin-node-polyfills. Things work on version 0.22.0 of this package, but later versions break for me.
Uncaught ReferenceError: can't access lexical declaration '__buffer_polyfill' before initialization
<anonymous> http://localhost:5173/@fs/Users/mark/pDev/docgen/node_modules/.vite/deps/vite-plugin-node-polyfills_shims_process.js
To reproduce this, use either "vite": "npm:rolldown-vite@latest" or "vite": "npm:rolldown-vite@8.0.0-beta.5" in package.json (instead of Vite 7x) and use the latest version of vite-plugin-node-polyfills.
I've seen PR139 which I think concerns fixing this, but I couldn't see any direct reference to the error details, so hope it's okay to open a ticket to capture that. I also see there is a related ticket in the Vite project on this (asking for it to be fixed here): #518.
Summary
When using the upcoming version of Vite (either the vite-rolldown package, or the Vite 8 beta package) I get a runtime error in apps that use
vite-plugin-node-polyfills. Things work on version0.22.0of this package, but later versions break for me.To reproduce this, use either
"vite": "npm:rolldown-vite@latest"or"vite": "npm:rolldown-vite@8.0.0-beta.5"inpackage.json(instead of Vite 7x) and use the latest version ofvite-plugin-node-polyfills.I've seen PR139 which I think concerns fixing this, but I couldn't see any direct reference to the error details, so hope it's okay to open a ticket to capture that. I also see there is a related ticket in the Vite project on this (asking for it to be fixed here): #518.