Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postinstall script forces package to become unplugged with yarn pnp #758

DuBistKomisch opened this issue Jan 27, 2020 · 1 comment


Copy link

@DuBistKomisch DuBistKomisch commented Jan 27, 2020

WIth yarn 2 about to become stable, it comes with pnp enabled by default, so postinstall scripts now have one more downside. Having a postinstall script forces core-js to be duplicated on disk unnecessarily, reducing the efficiency of yarn install in pnp mode, which could otherwise potentially perform no writing to disk.

I know you don't want to remove the postinstall script, but just pointing this out. Perhaps we can get yarn to add an explicit unplugged: false option to package.json?


This comment has been minimized.

Copy link

@nkalinov nkalinov commented Feb 27, 2020

Just found out that you can overcome this by explicitly tell Yarn2 not to build the package by adding dependenciesMeta to your package.json file:

  "dependenciesMeta": {
    "core-js": {
      "built": false

More info here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.