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

React is not defined Vite 5 #323

Open
stalin9116 opened this issue Oct 21, 2024 · 1 comment
Open

React is not defined Vite 5 #323

stalin9116 opened this issue Oct 21, 2024 · 1 comment

Comments

@stalin9116
Copy link

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
Copy link
Author

image
image

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

1 participant