cra-workspaces
v2.0.0
Published
Compile yarn workspaces as a part of your create-react-app
Downloads
15
Readme
Run create-react-app 3 with workspaces
All you have to do is create your app using create-react-app and install cra-workspaces.
⚠️ Please Note:
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'
Getting started
1) Install cra-workspaces
$ yarn add cra-workspaces -D
2) 'Flip' the existing calls to react-scripts
in npm
scripts
/* package.json */
"scripts": {
- "start": "react-scripts start",
+ "start": "cra-workspaces start",
- "build": "react-scripts build",
+ "build": "cra-workspaces build",
}
3) Start the Dev Server
$ yarn start
4) Build your app
$ yarn build