All you have to do is create your app using create-react-app and install cra-workspaces.
By doing this you're breaking the "guarantees" that CRA provides. That is to say you now "own" the configs. No support will be provided. Proceed with caution.
The goal of this package is to make a monorepo using yarn workspaces to share common code across a Create React App 2+ (CRA). It runs create-react-app with yarn workspaces without config files or using 'eject'
$ yarn add cra-workspaces -D
/* package.json */
"scripts": {
- "start": "react-scripts start",
+ "start": "cra-workspaces start",
- "build": "react-scripts build",
+ "build": "cra-workspaces build",
}
$ yarn start
$ yarn build