react-app-rewire-workspaces
react-app-rewired module enabling yarn workspaces
Last updated 8 months ago by with-heart .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-app-rewire-workspaces 
SYNC missed versions from official npm registry.

react-app-rewire-workspaces

A react-app-rewired module enabling yarn workspaces in create-react-app projects

Installation

Install the package:

yarn add -D react-app-rewire-workspaces

Make sure you also have react-app-rewired installed:

yarn add -D react-app-rewired

It's also recommended that you install customize-cra as it's the easiest way to consume react-app-rewire-workspaces:

yarn add -D customize-cra

Usage

react-app-rewired is driven by a config-overrides.js file in the root of your CRA directory. From there, we can import enableWorkspaces from react-app-rewire-workspaces and call it:

const enableWorkspaces = require('react-app-rewire-workspaces')

module.exports = function override(config, env) {
  config = enableWorkspaces()(config, env)

  return config
}

It's even easier if you use customize-cra:

const {override} = require('customize-cra')
const enableWorkspaces = require('react-app-rewire-workspaces')

module.exports = override(enableWorkspaces())

Current Tags

  • 0.0.2                                ...           latest (8 months ago)

2 Versions

  • 0.0.2                                ...           8 months ago
  • 0.0.1                                ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (5)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |