diff --git a/.changeset/shaggy-peaches-shop.md b/.changeset/shaggy-peaches-shop.md new file mode 100644 index 0000000000..b989a83e53 --- /dev/null +++ b/.changeset/shaggy-peaches-shop.md @@ -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`. diff --git a/config/config/src/index.ts b/config/config/src/index.ts index 6610e532ce..9e93e69be8 100644 --- a/config/config/src/index.ts +++ b/config/config/src/index.ts @@ -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,