How to initialize a mono repo and create-react-app inside monorepo?

Viewed 569

I want to initialize a monorepo, and then initialize apps inside the packages folder. I found a bunch of examples of how to do this. But, what I want to achieve is, I want to keep all the node_modules at the root level.

--monorepo
 |--node_modules
 |--packages
 | |--create-react-app-1
 | | |--src
 | | |--{...rest}
 | |--create-react-app-2
 | | |--src
 | | |--{...rest}
 |--package.json

So, all the node_modules are at the root level and all the packages are using them from the root level. All the dependencies and dev-dependencies are listed in the root level package.json.

I want to use yarn as the package manager as well.

How I can achieve this?

0 Answers
Related