-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guidance on current usage with Lerna and Yarn Workspaces? #275
Comments
try it and let us know? i dont really use lerna |
@sw-yx It will take another week or so until me and the team will be actively developing this project inside the monorepo + tsdx structure but I will note down my approach and any potential pain points as I go and post an update asap. I figured I would create this issue since it seems @jaredpalmer does use monorepo's within his organisation (see https://github.com/palmerhq/monorepo-starter) so I thought there might be some general advice that could be put here and eventually distilled into a readme entry but I'm happy to document and post my experience here and then we can decide if a readme section is worthwhile pursuing :) |
Currently if you set up monorepo with lerna and tsdx, But, running I think this is natural and inevitable for current |
@zenyr What's wrong with the Or are you referring to the note in the lerna docs?
|
I think there's room for a separate init config for I've been following roughly this approach, but needing to remember to modify a few of the instructions given that I'm using |
Will this help? |
@jannisg this can break your builds. Lerna links the packages together and orders builds based on the dependency graph: If you have three packages:
Lerna will build these in order: This is necessary. When you use |
Hey, To me, the best is to build once, and then run watch in --parallel with the --noClean option. Problem is that currently, the watcher is only looking for changes in ./src, so your symlinks will not be watched (+ they might be hoisted). Line 328 in b21d7af
Will see if I can send a PR for that, but was not very successful with patch-package :/ |
I am currently setting up a fresh monorepo structure using Lerna and TSDX to build out a component library.
I have read and followed the various links related to #122 but wanted to check if there is anything to consider when using TSDX inside a lerna monorepo before some kind of official monorepo template (might) land.
My current thinking is to:
tsdx
as adevDependency
at the root levelnpx tsdx create mylib-package-a
for each package inside thepackages/*
folderlerna run [flags]
to eitherstart
,watch
,test
orbuild
each individual package folder as one command.Is that roughly the right approach for using TSDX inside a monorepo structure?
The text was updated successfully, but these errors were encountered: