Skip to content

Library does not work together with Vite 8 #285

@c-bod

Description

@c-bod

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):

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions