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
Cannot import isDayJs from the ESM output #1306
Comments
Sorry for the inconvenience, just wondering why a 'module' entry change could lead to such a huge change? |
Oh I see you were already discussing the same issue on #1281 after opening this ticket. As far as I understand, this is related to how UMD exposes the default export. But I am no expert in that domain 😅 A way to solve this would be to explicitly export the above functions in the source code. |
Yeah, it's weird how angular/babylon/whatever is repackaging the file cause node ecmascript modules doesn't care either way regardless of the version as I reproduced in my testing and provided identical output. Feel free to use my shitty hotfix though that I posted at the end on that issue, lol |
let move this discussion to #1281 |
Describe the bug
The following import doesn't work anymore.
Before 1.10, the
module
field inpackage.json
used to point todays.min.js
which was not an ESM output. Now it is pointing toesm/index.js
and theisDayjs
function is not properly exported (it is only added todayjs.isDayJs,
which is later exported as the default export).Same thing applies to
locale
,extend
andunix
functions.Expected behavior
I'd like to be able to do:
instead of having to do:
Information
The text was updated successfully, but these errors were encountered: