ultra-runner
nextjs-monorepo-example
Our great sponsors
ultra-runner | nextjs-monorepo-example | |
---|---|---|
4 | 19 | |
1,187 | 1,461 | |
- | - | |
0.0 | 9.9 | |
5 days ago | 7 days ago | |
TypeScript | TypeScript | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ultra-runner
-
Directly point to source code when referencing dependencies in monorepo
Cache built files to avoid rebuilds. For example nx.js, yarn-plugin-change, ultra-runner
-
Next.js monorepo build process optimization
Then comes the question of triggering docker builds if you need to release images. If you have many apps, it's better to create a docker file for each, so you can decide which one needs to be built. Nx help in this area, because it can compute which apps needs to be rebuilt... If you have only few apps you can use github action paths (ie: simplified example) or eventually make use of things like [ultra-runner](https://github.com/folke/ultra-runner). Anyway docker and nextjs take times to setup (env...). It's another story.
-
What is monorepo? (and should you use it)
ultra-runner: scripts for JavaScripts monorepo management. Plugs in with Yarn, pnpm, and Lerna. Supports parallel building.
-
JavaScript Monorepo Tooling
🏃 ultra-runner
nextjs-monorepo-example
-
TypeScript monorepo
For info you can have a look to a setup in httpx (simple yarn 4 + workspaces) or nextjs-monorepo-example (yarn 4 workspaces + turbo + recipe for docker)
-
Why Next?
I like https://github.com/belgattitude/nextjs-monorepo-example/
-
How do you keep FE dependencies up to date?
It's pretty easy to setup renovate, the "update dependency XXX PR" comes with the upstream changelogs from which you can have an idea of the work to do if needed. Compared to some other similar tools: monorepo support (ie: workspace:"") + possibility to dedupe your lock file + an easy way to regroug packages (ie: "@vitest/ui" and "vitest" together). An example: https://github.com/belgattitude/nextjs-monorepo-example/blob/main/renovate.json5.
-
Separating components from Next.js in a mono repo
https://github.com/belgattitude/nextjs-monorepo-example Here is a very good example monorepo with a similiar usecase
-
Eslint warnings in neovim but not vscode
Until the “flat” eslint config file becomes the standard, Here’s a nice example of how to do it.
-
is nx worth it for a smallish typescript monorep?
PS: You can see there: https://github.com/belgattitude/nextjs-monorepo-example (bunch of recipes but definitely needs a cleanup) and this question https://github.com/belgattitude/nextjs-monorepo-example/discussions/2220
-
Best way to deal with long background jobs when deploying Next.js to Vercel?
There is one moderately complex example monorepo that includes a Next.js project and shared lib projects here: https://github.com/belgattitude/nextjs-monorepo-example
-
Looking for the right project structure for multiple teams (monorepo vs separate repos)
I sometimes put some examples in https://github.com/belgattitude/nextjs-monorepo-example. It's bare-bone and offer few pros/cons (no nx, no turbo.., but you can upgrade along the way).
-
which solutions do you use for i18n in typescript?
But if you have time, you can have a look to this https://github.com/belgattitude/nextjs-monorepo-example/blob/main/apps/web-app/src/features/demo/demo.config.ts.
-
Next.js monorepo build process optimization
- If you're using yarn 1, go yarn 3+ with "node_linker: node_modules", eventually "nmMode: hardlinks-local" and yarn workspace plugin (example of .yarnrc.yml config). You'll get some speed up and the update should not be too long to do. Note: this gives comparable speed of pnpm in my experience (whatever benchmark I read).
What are some alternatives?
lerna - :dragon: Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository.
next-i18next - The easiest way to translate your NextJs apps.
yarn.build - Build 🛠 and Bundle 📦 your local workspaces. Like Bazel, Buck, Pants and Please but for Yarn Berry. Build any language, mix javascript, typescript, golang and more in one polyglot repo. Ship your bundles to AWS Lambda, Docker, or any nodejs runtime.
react-i18next - Internationalization for react done right. Using the i18next i18n ecosystem.
pnpm - Fast, disk space efficient package manager
serverless-next.js - ⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
npm-lint - A linter for npm & node package.json files with a focus on dependency security
React Intl - The monorepo home to all of the FormatJS related libraries, most notably react-intl.
corepack - Zero-runtime-dependency package acting as bridge between Node projects and their package managers
nextron - ⚡ Next.js + Electron ⚡
turborepo - Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust – including Turborepo and Turbopack. [Moved to: https://github.com/vercel/turbo]
jsLingui - 🌍 📖 A readable, automated, and optimized (3 kb) internationalization for JavaScript