Improving Next.js Monolith
Hi Everyone! I have a question about architecting my app.
Currently I have a single (massive) Next.js 12 app that powers websites for multiple domains. This is because all of these domains have similar website and share many pages and components. Currently what it does is check domain client-side and render website accordingly (themes & content as per the domain). But as it is growing, its becoming slow. What would be a better way to build websites like these. What is the standard practice in this case?
1 Reply
Maybe a turborepo?
https://turbo.build
EDIT: I also feel like the check should be server-side, so it can be cached better and so on. I of course have not seen your app or code, but just a thought.
Turbo
Turbo
Turbo is an incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust.