my goal is to connect the docs
and web
folder.
- I wish to access the app from
https://localhost:3000/docs
orhttps://localhost:3000/web
. - I wish to share state between docs and web, i.e. a counter (1, 2, 3, and so on).
What I did:
Search for similar discussions:
TLDR, I am new to Next.js and Turbo.
Disclaimer:
- I am an Angular developer.
- I used to be a React developer.
- I am new to the Monorepo concept.
i. I tried Angular Workspace and it works great but I want independent
package.json
per application. ii. I also want SSR. Angular Universal does offer SSR but it's relatively new. Next.js on the other hand do not offer something similar to Angular Workspace. This is where Turbo or Module Federation comes in. - I see that Module Federation connect between 2 application with
React.lazy()
https://webpack.js.org/concepts/module-federation/ - I believe Next.js routing is by folder. https://nextjs.org/docs/app/building-your-application/routing/defining-routes