yalc icon indicating copy to clipboard operation
yalc copied to clipboard

package.json publishConfig is not applied

Open boromisp opened this issue 4 years ago • 7 comments

It would be awesome if at least the main and module values could be overwritten based on the publishConfig:

https://yarnpkg.com/configuration/manifest/#publishConfig

https://classic.yarnpkg.com/en/docs/package-json#toc-publishconfig

https://docs.npmjs.com/cli/v6/configuring-npm/package-json#publishconfig

The yarn v2 implementation seems to be stricter in what config values can be overwritten.

boromisp avatar Mar 05 '21 09:03 boromisp

I totally agree. I got everything working with yalc but this is a blocker for me 😦

wycats avatar May 10 '23 17:05 wycats

How should publishConfig be applied?

wclr avatar May 17 '23 19:05 wclr

The values in publishConfig should overwrite the relevant top-level values in the base package.json. Here's the documentation for how pnpm does it: https://pnpm.io/package_json#publishconfig

corbt avatar Sep 20 '23 05:09 corbt

(Sorry for not replying earlier, but @corbt got it).

Circling back around, this is still a blocker for me. It creates a divergence between pnpm publish and yalc publish that breaks the whole concept of the yalc workflow for me.

Maybe you could consider using pnpm package directly, which would guarantee equivalence?

wycats avatar Oct 16 '23 18:10 wycats

pnpm package

pnpm pack*

NullVoxPopuli avatar Dec 07 '23 18:12 NullVoxPopuli

use yald , it is fork yalc,add publishConfig support

github

zhangfisher avatar Mar 02 '24 06:03 zhangfisher