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
{{ message }}
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Firstly, thank you for your excellent article on medium.com. It has been a huge help to my understanding of the package.json, node, cjs and esm.
My question is what is the requirement for the main, module and typings fields in your root package.json? I understand what these fields represent (entry points for cjs, esm and Typescript, respectively) but are they not superfluous to requirements as each subpath effectively acts as it's own module access via package/module/submodule syntax therefore negating the requirement for these entry points? Or is this some kind of edge case I am unaware of? Thanks.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Firstly, thank you for your excellent article on medium.com. It has been a huge help to my understanding of the
package.json,node,cjsandesm.My question is what is the requirement for the
main,moduleandtypingsfields in your rootpackage.json? I understand what these fields represent (entry points forcjs,esmandTypescript, respectively) but are they not superfluous to requirements as each subpath effectively acts as it's own module access viapackage/module/submodulesyntax therefore negating the requirement for these entry points? Or is this some kind of edge case I am unaware of? Thanks.Beta Was this translation helpful? Give feedback.
All reactions