Illuvium Frontend Sessions - June 8th 2022 🗓
Can we improve that experience?
A monorepo is basically codebase in which different projects are living within the same repository.
We have different repositories (mostly Next.js apps) that are deployed in different illuvium.io
subdomains.
We need to:
- Replicate common configurations -
eslint
,testing
,husky
,commitlint
,prettier
,npmrc
,PR templates
; - Depend on common packages -
@illuvium/design
.
Which leads to bad DX (Developer Experience) 😭.
YES 💪🏽
Monorepos might provide what we need to bad DX on our FE.
The advantages +:
- Easy code reuse and dependency management;
- Easy refactoring and bug solving;
- Easy version sync;
- One and only source of truth;
- Unified configuration;
- Visibility on all things FE;
- Development speed.
The disadvantages −:
- Tooling knowledge (Learning curve);
- Might be too big to have good performance (May the tools help us 🙏);
- Big repository size;
- If something is broken we all suffer 😢.
Monorepo tooling has been growing over the last years. You might have heard about:
Turborepo was acquired by Vercel last year. Seems to be really easy to pick and set up.
Why turborepo:
- Fast builds;
- Caching (Has cloud caching with Vercel);
- Execute
yarn dev
in parallel (Changes on@illuvium/design
will be instantly replicated onIlluvidex
); - Easily run commands for specific packages using turborepo's filtering;
AMA 😉