ember-try icon indicating copy to clipboard operation
ember-try copied to clipboard

Yarn PnP Support?

Open rwjblue opened this issue 7 years ago • 2 comments

I have not done a bunch of exploratory work here, but I think a few changes would be needed here to support yarn --pnp apps. I've been exploring what it would take for ember-cli to support this out of the box over in ember-cli/ember-cli#8164.

Some general things to address:

  • [ ] When useYarn: true we should detect ./.pnp.js and add --pnp option
  • [ ] Handle the scenario where there is no node_modules folder

rwjblue avatar Oct 31 '18 16:10 rwjblue

Fyi, the easiest no-config way to detect whether Plug'n'Play should be enabled or not is to simply check whether you're running under it or not. This can be easily checked using process.versions.pnp:

const usePnp = !!process.versions.pnp;

arcanis avatar Nov 08 '18 14:11 arcanis

@arcanis that only works if yarn run is used though, right?

* When `useYarn: true` we should detect `./.pnp.js` and add `--pnp` option

I'm not sure if this is necessary. Once yarn --pnp has been used it adjusts the package.json file so that --pnp will be used by default from then on.

Turbo87 avatar Jan 02 '19 13:01 Turbo87