Closed philippkuehn closed 3 years ago
Hey @dmonad, actually I currently have a problem using lib0
as a dependency once I want to support esm
and cjs
. But you are right. The current PR isn't correct. Didn't realize that the module
field in package.json
is only used by bundlers and not by node.js itself. So I’m closing this because of #23.
Hey @philippkuehn ,
This is already correctly defined.
lib0
is an esm module (seetype: 'module'
) that requires you to set the esm module as the target.Is there an issue you are facing?
Current versions of nodejs allow to set "conditional exports". If you want we can define them instead to allow cjs modules to use
lib0
without pointing directly to thedist
folder.