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

React is not defined Vite 5

Open stalin9116 opened this issue 1 year ago • 2 comments

Hi. Problem Description: In the development environment, the library works correctly. However, when I build for production and deploy the application, the following error appears in the console:

Uncaught ReferenceError: React is not defined

The error occurs in the following line of code from react-multi-date-picker:

React.Fragment

return ft.default.createElement(React.Fragment, { key: mo });

Using React with Vite in the project. Installing react-multi-date-picker via npm. Basic implementation of the component in the application. Building for production (npm run build). Deploying the application to the production server.

Is there any known solution for this issue, or any additional configuration I should make to ensure the library works correctly in production?

stalin9116 avatar Oct 21 '24 23:10 stalin9116