If you use
create-react-app
, #5136 (released with the 2.0) implements a--use-pnp
option that allows you to easily create a new project using PnP! In this case, just usecreate-react-app --use-pnp
together with Yarn 1.12, and you're good to go! 👍
Plug'n'Play is a new initiative from Yarn that aims to remove the need for node_modules
. It's already available, and has proved being effective even on large-scale infrastructures. This document describes in a few steps how to quickly get started with it. Spoiler alert: it's quite easy 🙂
First, download a package manager that supports it. Yarn 1.12 already does, so that's what we're going to use! To install it, just follow the instructions on our website: https://yarnpkg.com/en/docs/install
If everything is ok, running
yarn --version
should give youv1.12.1
or higher. If you don't get this result maybe a