Interesting UI monorepo config: 1


Interesting UI monorepo config:

1. Place each project in a separate folder
2. Place a single package.json in root.

So all projects share a single package.json.

One of my clients is using this approach. I've been thinking about the tradeoffs...

#javascript #reactjs
Downsides:
- Requires a custom build config (you can’t use a standard generator such as create-react-app).

- All projects must reference the same version of all dependencies...
Upsides:
- Don’t need separate package.json dependencies for each project.
- Easily share npm scripts between projects
- Easily reference files in other projects w/out symlinks
- Complete control (build is custom)...
- Enforces continuous integration (because you can’t reference an old version of a given project)

I think I still prefer a “traditional” monorepo using @lernajs. Building and maintaining a custom build process from scratch is a lot of work.

See other tradeoffs I’m overlooking?

View original on X