Support for resolving Yarn Plug 'n Play modules
See original GitHub issueDo you want to request a feature or report a bug? Request a feature
What is the current behavior? Metro does not (yet) have PnP support
If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install
and yarn test
.
What is the expected behavior? I think it would be very handy if Metro had support for resolving Yarn PnP modules.
Not only would there be the benefits you’d get for using it in other project, I believe that if this Yarn feature request is able to be resolved, this could be a reasonable alternative to using symlinks (since they are not able to be supported for technical reasons)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:20
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Plug'n'Play | Yarn - Package Manager
An overview of Plug'n'Play, a powerful and innovative installation strategy for Node.
Read more >get rid of node_modules with Yarn Plug'n'Play - Medium
How to get rid of node_modules with Yarn Plug'n'Play ... A special resolver is used in order to help Node discovering where each...
Read more >Advanced package manager features for npm, Yarn, and pnpm
Alternative dependency resolution strategies. The problem with the traditional node_modules approach; Yarn Berry's Plug'n'Play approach.
Read more >Module not found running next build using yarn Plug'n'Play
Thank you, the yarn rebuild command was key for me! In my case I was on yarn@3.2.3, I ran yarn set version latest...
Read more >yarn - Getting started with Plug n Play - w3resource
Once you do this, Yarn will create a file named .pnp.js each time you run yarn install rather than the node_modules folder. To...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@arlyon I just added an example repo with pnp and react native working. Checkout the metro.config.js here: https://github.com/dalinarkholin/react-native-pnp-enabled
Also my comment here: https://github.com/react-native-community/cli/issues/27#issuecomment-625912523
But yes, it would be good to get it back as a option as well 😃
It actually already does! We just need to open-source the resolver in a separate package (or make it native, possible) 😃 ping @rafeca