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

Yarn PnP Support? #214

Open
2 tasks
rwjblue opened this issue Oct 31, 2018 · 2 comments
Open
2 tasks

Yarn PnP Support? #214

rwjblue opened this issue Oct 31, 2018 · 2 comments

Comments

@rwjblue
Copy link
Member

rwjblue commented Oct 31, 2018

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
@arcanis
Copy link

arcanis commented Nov 8, 2018

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;

@Turbo87
Copy link
Member

Turbo87 commented Jan 2, 2019

@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.

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

No branches or pull requests

3 participants