You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you have any reference links on best practice to support both ESM and CJS? I assume the cjs and esm submodule pathing is a common, but curious on best practice configuration of package.json. I had been meaning to support ESM, however probably as a minor semver, as internal directories have been changed.
I use below config, seems working, but not sure if it is best practice.
Closing for now, we can reopen if you think the docs is missing something (or don't hesitate to open a PR to improve the docs if you have suggestions).
What is the problem this feature will solve?
I fork a typescript CJS repo to add ESM support.
sinclairzx81/typebox#400 (comment)
I use below config, seems working, but not sure if it is best practice.
https://github.com/loynoir/typebox/blob/feat-esm/package.json#L13-L56
What is the feature you are proposing to solve the problem?
Official document on best practice of package.json for dual package (CJS+ESM).
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: