-
Notifications
You must be signed in to change notification settings - Fork 16
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
refactor: esm first #365
refactor: esm first #365
Conversation
makes legacy cjs the special case
makes legacy cjs the special case
Sweet, I got PR number 365 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use of exports
in package.json
is problematic for React projects. See issue #343
Also, we'd prefer (for now) to keep the rollup.config.js
as is. We made an earlier attempt to convert from cjs to mjs format and had difficulties with the GitHub CI actions.
:/ classic react: "we won't let you do the standard thing because we're cleverer than tc39 and whatwg" |
fwiw, i've dug plenty of teams out from under their mess of react nonsense, and it's possible to get a react app running with javascript written to standards shipped >2 years ago (export maps), it's just not as straightforward and pleasant as never having fallen for the react malarkey in the first place |
i'd like to suggest that if users can't use the thing which was ubiquitously shipped over two years ago because their framework is too crufty, that they should just use the old thing |
I'm trying to get this PR merged but it's failing on the test phase. Possibly related to adding
Do you know how to fix this? |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Thanks for the ping. I ported all the import specs over and added import attributes, the tests now run in node 20. it may be possible to allow earlier node versions by building with rollup plugins. several tests appear to fail with off-by-one errors |
Thanks for taking a look! It looks like Node 16 is no longer in LTS, but we're committed to supporting Node 18 through its LTS maintenance phase through April 2025. We'll work in as many of these patches as we can without breaking Node 18 and see if we can get to the finish line! |
Sounds good. In that case I suggest that we add a build step which converts the JSON output from the .po files into JavaScript modules. This can be as simple as prepending |
All changes should now be in v5.0.3. Can you confirm that it's working for you and we can close this pull request? |
makes legacy cjs the special case
add package exports
fix some .d.ts tsc errors
closes #371