feat(init): initType default value is set to module (#9486)

This commit is contained in:
btea
2025-08-17 16:58:03 +08:00
committed by GitHub
parent 8c3302fd3c
commit d01b81f4a9
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/config": major
"pnpm": major
---
The default value of the `type` field in the `package.json` file of the project initialized by `pnpm init` command has been changed to `module`.

View File

@@ -164,7 +164,7 @@ export async function getConfig (opts: {
'ignore-workspace-root-check': false,
'optimistic-repeat-install': false,
'init-package-manager': true,
'init-type': 'commonjs',
'init-type': 'module',
'inject-workspace-packages': false,
'link-workspace-packages': false,
'lockfile-include-tarball-url': false,