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
When I run npm init, the generated package.json does not include a type field.
Expected Behavior
NodeJS has supported ES Modules since version ~12 (link). If using ES Modules is the recommended approach for JS packages targeting Node/browsers, then it may make sense to update npm init to enable ES Modules by default.
Adoption of type=module is around 10% today. By making type=module the default, I expect many more projects to use ES Modules going forward.
Steps To Reproduce
No response
Environment
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When I run
npm init
, the generated package.json does not include atype
field.Expected Behavior
NodeJS has supported ES Modules since version ~12 (link). If using ES Modules is the recommended approach for JS packages targeting Node/browsers, then it may make sense to update
npm init
to enable ES Modules by default.Adoption of
type=module
is around 10% today. By makingtype=module
the default, I expect many more projects to use ES Modules going forward.Steps To Reproduce
No response
Environment
No response
The text was updated successfully, but these errors were encountered: