react-multi-date-picker icon indicating copy to clipboard operation
react-multi-date-picker copied to clipboard

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

Open howlg189 opened this issue 1 year ago • 3 comments

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?

howlg189 avatar Feb 28 '24 01:02 howlg189

i have the same question.

kanna0001 avatar Feb 28 '24 11:02 kanna0001

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

ryanlynch717 avatar Mar 14 '24 14:03 ryanlynch717

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

imjahanzaib avatar Apr 09 '24 05:04 imjahanzaib