Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run create-react-app 3 with workspaces

npm version npm monthly downloads

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

About

Create react app and yarn workspaces without "eject"

Topics

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages