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-daterange-picker doesn't work when using vite #88

Closed
jaknas opened this issue Feb 19, 2021 · 4 comments
Closed

react-daterange-picker doesn't work when using vite #88

jaknas opened this issue Feb 19, 2021 · 4 comments
Labels
question Further information is requested stale

Comments

@jaknas
Copy link

jaknas commented Feb 19, 2021

The error is: Uncaught ReferenceError: require is not defined

See: vitejs/vite#986 and vitejs/vite#343 (comment)

@jaknas
Copy link
Author

jaknas commented Feb 19, 2021

update:
works fine if using entry without styles and loading them alongside inside the component:

import '@wojtekmaj/react-daterange-picker/dist/DateRangePicker.css';
import 'react-calendar/dist/Calendar.css';
import DateRangePicker from '@wojtekmaj/react-daterange-picker/dist/entry.nostyle';

@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

@github-actions github-actions bot added the stale label Feb 28, 2022
@github-actions
Copy link
Contributor

This issue was closed because it has been stalled for 14 days with no activity.

@wojtekmaj wojtekmaj added the question Further information is requested label Mar 18, 2022
@taily-khucnaykhongquantrong

You could also use this plugin as in this example: vitejs/vite#5308 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested stale
Projects
None yet
Development

No branches or pull requests

3 participants