Yarn PnP Support?
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: truewe should detect./.pnp.jsand add--pnpoption - [ ] Handle the scenario where there is no
node_modulesfolder
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 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.