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

ESModules complaint export of DayPickerInput #1224

Closed
wants to merge 2 commits into from

Conversation

natepappenhagen
Copy link

@natepappenhagen natepappenhagen commented May 17, 2021

ESModules compliant export of DayPickerInput

This lib @ 7.4.10 currently blocks me and my team from moving forward with Vite/Rollup because DayPickerInput does not export in an ES Modules compliant way. This should now export DayPickerInput from the index of DayPicker.

this should resolve this open issue:
#1194

So we can import like this:

import { DayPickerInput } from 'react-day-picker';

@natepappenhagen
Copy link
Author

@gpbl for review 🙇‍♂️

@natepappenhagen
Copy link
Author

in the event this doesn't get merged, I published an NPM fork with this one and only change that should make this lib not error for Vite/Rollup.

:cheers:

https://www.npmjs.com/package/@natenhagen/react-day-picker

@gpbl gpbl added Review Needed Request for review comments Type: DayPickerInput Issue dedicated to the beloved DayPickerInput v7 (maintenance) labels Nov 4, 2021
@gpbl gpbl added this to the v7.4 (maintenance) milestone Nov 4, 2021
@tpenaranda
Copy link

Had issues with DayPickerInput import and Vite build. tl; dr; React dev build was working but prod wasn't.
Solved it by switching from:

import DayPickerInput from 'react-day-picker/DayPickerInput';

<DayPickerInput ... />

To:

import DayPicker from 'react-day-picker';

<DayPicker.Input ... />

@gpbl
Copy link
Owner

gpbl commented Mar 26, 2022

Closing as we've released v8: this PR belongs to a version which is not longer maintained. In case, feel free to open a new PR. Thanks!

@gpbl gpbl closed this Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Review Needed Request for review comments Type: DayPickerInput Issue dedicated to the beloved DayPickerInput v7 (maintenance)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants