air-datepicker icon indicating copy to clipboard operation
air-datepicker copied to clipboard

Avoid default exports for locale files

Open krechtern opened this issue 1 year ago • 1 comments

I'm currently trying to use this library inside an angular library. When building the library the locale import will interpreted in a way that I receive {default: {…}, __esModule: true} instead of the locale object. This seems to be a common problem as described here: https://esbuild.github.io/content-types/#default-interop

Maybe it would be a good approach to avoid the default exports for the locale files, so this problem does not occur for other users too.

krechtern avatar Feb 01 '24 15:02 krechtern

Agreed. The way that the locale modules are written is really complicating the usage of this library. If they exported something like "localeEn" by default, then it may be easier to use in a dynamic situation?

ConnectGrid avatar Apr 03 '24 18:04 ConnectGrid