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

Feature Request: Support esmodule #715

Open
magiziz opened this issue Oct 6, 2023 · 1 comment
Open

Feature Request: Support esmodule #715

magiziz opened this issue Oct 6, 2023 · 1 comment

Comments

@magiziz
Copy link

magiziz commented Oct 6, 2023

Description

We have been shipping awesome features with i18n-js. But we also encountered some of the issues with esmodule when people were downloading our package and it didn't work well. We say that from here: fnando/i18n#44 (comment)

But we also went with your appraoch too: fnando/i18n#44 (comment)

I feel like i can help you raise a PR on this repo if you can show me how you want me to update it. I was thinking of going with the same approach as this guy suggested: fnando/i18n#44 (comment)

But let me know what you think 👍

@magiziz
Copy link
Author

magiziz commented Oct 6, 2023

Also want to address this too. Locally this works fine, but when we ship it externally then it doesn't point out well and people might get this bug too:

`import { I18n } from "i18n-js";
         ^^^^
SyntaxError: Named export 'I18n' not found. The requested module 'i18n-js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

@magiziz magiziz changed the title Feature Request: Support esmodule instead of commonjs Feature Request: Support esmodule Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant