Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why do I need the jsxRuntime: "classic" option when I use it on vite? #281

Open
howlg189 opened this issue Feb 28, 2024 · 3 comments
Open

Comments

@howlg189
Copy link

React-multi-date-picker is being used in the vite environment.
It can be used normally in localhost dev, but the "React is not defined" error occurs during production build.
Adding the following options to the vite.config.js file will also run in production build, but I don't know why.

plugins: [
        react({
            jsxRuntime: "classic",
        }),
    ]

How does jsxRuntime affect?

@kanna0001
Copy link

i have the same question.

@ryanlynch717
Copy link

Had this same issue after upgrading the package to latest, nothing in documentation regarding this.

@imjahanzaib
Copy link

same issue. Using it with a Shopify Nodejs App with Vite, Including jsxRuntime fixed the "React is not Defined" Error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants