-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
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
googol, electrovir and shian15810
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps