From 6a1468495e5058761bfe36ea0522b5bd16b8d077 Mon Sep 17 00:00:00 2001 From: Scott <52388100+ScottAwesome@users.noreply.github.com> Date: Sat, 15 May 2021 02:25:21 -0700 Subject: [PATCH] support for `type` and `imports` in publishConfig (#3315) * support for `type` and `imports` in publishConfig This PR is for allowing `type` to be overriden in the `package.json` when used with the `publishConfig` key. This is so that during development, in particular with a monorepo, it can be challenging when on a project to be able to seamlessly work across dependencies, when `type` is is defined * feat: created new changeset for feature addition Co-authored-by: ScottAwesome --- .changeset/forty-apples-hunt.md | 5 +++++ packages/exportable-manifest/src/index.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/forty-apples-hunt.md diff --git a/.changeset/forty-apples-hunt.md b/.changeset/forty-apples-hunt.md new file mode 100644 index 0000000000..d38dad5411 --- /dev/null +++ b/.changeset/forty-apples-hunt.md @@ -0,0 +1,5 @@ +--- +"@pnpm/exportable-manifest": patch +--- + +Adds support for `type` and `imports` in publishConfig diff --git a/packages/exportable-manifest/src/index.ts b/packages/exportable-manifest/src/index.ts index bf0bdcef02..82b65cb662 100644 --- a/packages/exportable-manifest/src/index.ts +++ b/packages/exportable-manifest/src/index.ts @@ -8,6 +8,8 @@ import * as R from 'ramda' const PUBLISH_CONFIG_WHITELIST = new Set([ // manifest fields that may make sense to overwrite 'bin', + 'type', + 'imports', // https://github.com/stereobooster/package.json#package-bundlers 'main', 'module',