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 <scottawesome@users.noreply.github.com>
This commit is contained in:
Scott
2021-05-15 02:25:21 -07:00
committed by GitHub
parent 7030ad8e28
commit 6a1468495e
2 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/exportable-manifest": patch
---
Adds support for `type` and `imports` in publishConfig

View File

@@ -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',