Support Lerna and/or Yarn Workspaces
See original GitHub issueAre there any plans to support Lerna? By default Lerna uses the packages
directory to store the packages. Right now the content of that folder is not transpiled so it’s not possible to use ES6 code in there. It would be nice to have the possibility to use Lerna to create a monorepo application with create-react-app.
I’ve tried using the src
directory with Lerna, but that conflicts with not ignoring node_modules
directory inside the src
directory, so it gives a ton of lint errors when you do so.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:385
- Comments:198 (27 by maintainers)
Top Results From Across the Web
Bether JS-code completion for monorepos (with lerna andor ...
In monorepos via lerna or yarn workspaces, all libraries installed via yarn are stored in node_modules inside the root directory.
Read more >A Beginner's Guide to Lerna with Yarn Workspaces | by jsilvax
When coupled together, Lerna and Yarn Workspaces can ease and optimize the management of working with multi-package repositories.
Read more >Managing Monorepo using Lerna and Yarn workspaces
This section describes the way to use Lerna and Yarn Workspaces to manage Monorepo. ... First, you have to set the private and...
Read more >Workspaces in Yarn | Yarn Blog
Internally it uses Yarn or the npm CLI to bootstrap (i.e. install all third party dependencies for each package) a project. In a...
Read more >Monorepo Javascript Projects with Yarn Workspaces and Lerna
Yarn workspaces are used to optimize dependency management. When we use yarn workspaces, all project dependencies are installed in one go. Tools ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What would be nice at this point if someone from the CRA team would post what the status of supporting monorepos is. Do they still plan on going the nwb route with documentation and when can we expect to see it?
There are a lot of people interested in using CRA with monorepos so code can be shared among apps and several of them have posted what they’ve tried to do. One thing that is common with all the attempts to support monorepos with CRA is they work but not with the experience people want. What we currently have working is a decent solution but then there are annoyances like not being able to debug source code (debugging transpiled code is ugly).
For me the holy grail of Lerna support with CRA would look something like,
The idea here is that we have a monorepo for web clients that can contain multiple CRA-based apps as peers that have access to a few shared other packages (e.g. a lib of shared presentational components, maybe a lib with some api calling utils, anything else). The CRA apps should be able to require code from the other packages and Babel should know to transpile such code coming from within the monorepo automatically.
Is this possible with Lerna and CRA at the moment? Any related issues or info I can look at?