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

esm version #1194

Closed
KannarFr opened this issue Mar 25, 2021 · 9 comments
Closed

esm version #1194

KannarFr opened this issue Mar 25, 2021 · 9 comments
Labels
bug Bug or Bug fixes package Issues related to the npm package and commonjs support v7

Comments

@KannarFr
Copy link

Describe the bug

Due to vitejs/vite#2692, vitejs/vite#2139 and finally rollup/plugins#481, can you release an esm version of this library like lodash does with lodash & lodash-es?

@KannarFr
Copy link
Author

@gpbl fyi

@sinnbeck
Copy link

sinnbeck commented Apr 6, 2021

If anyone stumble upon this issue, you can do this to make it work in both vite and rollup

import DPI from 'react-day-picker/DayPickerInput';
const DayPickerInput = DPI.__esModule ? DPI.default : DPI

@KannarFr
Copy link
Author

KannarFr commented Apr 6, 2021

@sinnbeck thanks!

@dylang
Copy link

dylang commented Sep 21, 2021

https://github.com/gpbl/react-day-picker/blob/master/packages/react-day-picker/rollup.config.js#L14

Is this supposed to be format: 'es' - not format: 'esm'?

From Rollup's docs:

-f, --format <format>       Type of output (amd, cjs, es, iife, umd, system)

Just a guess, I'm not a Rollup user.

@tjfred35
Copy link
Contributor

tjfred35 commented Nov 4, 2021

Yes, I think it should be es not esm

@tjfred35 tjfred35 added the bug Bug or Bug fixes label Nov 4, 2021
@gpbl
Copy link
Owner

gpbl commented Nov 5, 2021

Yes, I think it should be es not esm

@tjfred35 we need to organize these build issues. I am not sure if the current build works as expected.

@gpbl gpbl added the package Issues related to the npm package and commonjs support label Nov 5, 2021
@jodaka
Copy link

jodaka commented Nov 5, 2021

Last week we had to downgrade Node from 17 back to 16, cause this package wasn't compiling. Something to check once this issue is resolved

@tjfred35
Copy link
Contributor

tjfred35 commented Nov 8, 2021

format: 'esm', and format: 'es', produce the exact same result...so that's not the issue. Is this a v7 issue, I imagine?

@gpbl gpbl added the v7 label Mar 26, 2022
@gpbl
Copy link
Owner

gpbl commented Mar 26, 2022

Closing as we've released v8: this issue belongs to a version which is not longer maintained, and it is likely fixed. In case, please open a new issue. Thanks!

@gpbl gpbl closed this as completed Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug or Bug fixes package Issues related to the npm package and commonjs support v7
Projects
None yet
Development

No branches or pull requests

6 participants