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
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
Current issues
node
folder for CJS is misleading and not discoverableView source
action in VS Code goes to the (hard to read) CJS versionpackage.json
doesn’t specify the type fieldmoduleResolution: "Node" | "NodeNext"
Suggestions
My preferred implementation would be to do what we learned from doing the dual package in Radix Themes (see on unpkg):
type: "commonjs"
in the root package.jsontype: "module"
in the esm folder package.jsonexports
field withrequire
andimport
declarationscjs
andesm
folders in the built packagepublint can be a good way to check if all looks good:
https://publint.dev/@base_ui/react@1.0.0-alpha.2
https://publint.dev/@radix-ui/themes@3.1.4
Some details on the possible implementations:
https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html
The text was updated successfully, but these errors were encountered: