Hi!
We recently upgraded to Vite 8 in our project and it resulted in the following error for us ("QRCode" is the name of the component we render ReactQRCode inside of):
What ended up fixing it for us was adding legacy: { inconsistentCjsInterop: true, } to our vite config, but that does not seem like a good long-term solution. 🙂
Would it be possible to update the library, so that it works together with vite 8 without having to rely on legacy features?
I hope the following will help you understand what the issue is (I do not understand the details 😅):
https://vite.dev/blog/announcing-vite8
https://main.vite.dev/guide/migration#consistent-commonjs-interop
https://rolldown.rs/in-depth/bundling-cjs#ambiguous-default-import-from-cjs-modules
Hi!
We recently upgraded to Vite 8 in our project and it resulted in the following error for us ("QRCode" is the name of the component we render ReactQRCode inside of):
What ended up fixing it for us was adding
legacy: { inconsistentCjsInterop: true, }to our vite config, but that does not seem like a good long-term solution. 🙂Would it be possible to update the library, so that it works together with vite 8 without having to rely on legacy features?
I hope the following will help you understand what the issue is (I do not understand the details 😅):
https://vite.dev/blog/announcing-vite8
https://main.vite.dev/guide/migration#consistent-commonjs-interop
https://rolldown.rs/in-depth/bundling-cjs#ambiguous-default-import-from-cjs-modules