webcrypto issue w/ vite6(vs. 5) rr v7 ssr while in cf-wrangler [minflare]

Its not a bug i can point to yet because the likelihood is that its almost certainly vite or the vite config's fault but the following combination and using vite 6 vs vite 5 causes webcrypto not resolving. this causes subtle bugs in better-auth that i didn't pick up on and i thought were related to linked generic oauth issues. ssr step reports this: node_modules/@noble/ciphers/esm/cryptoNode.js (6:77): "webcrypto" is not exported by "vite-browser-external", imported by "node_modules/@noble/ciphers/esm/cryptoNode.js". node_modules/@noble/hashes/esm/cryptoNode.js (11:9): "webcrypto" is not exported by "vite-browser-external", imported by "node_modules/@noble/hashes/esm/cryptoNode.js". then for instance getuserinfo will fail with "webcrypto" is not exported by "__vite-browser-external", imported by "node_modules/@noble/ciphers/esm/cryptoNode.js". not your problem i think but i think you'll get ppl complaining in the future. vite 5.4.17 works fine.
1 Reply
KZ
KZOP3w ago
i'll figure it out eventually just wanted to post it here in case someone hits the same issue will post to github if it ends up being an actual bug that better-auth needs to address

Did you find this page helpful?