#Sharing pages across repos

2 messages · Page 1 of 1 (latest)

drowsy stag
#

I am starting a new project for work based on nextjs for a large ecommerce website hosted in AWS that will be maintained by multiple teams with different repos and release cadences.

Based on existing team structures and release cadences, I would like to have separate repos for different parts of the site based on root path, and also have a shared repo for things like the root layout and shared components like site header and footer.

Is there a way to reuse routing parts like pages/layouts using app router across npm module boundaries, so things like middleware and root layouts can be managed as npm dependencies?

An example of reuse would be a root layout that injects the site header and theme information so that each sub directory wouldn't be inserting the site's header and top level CSS, site skeleton, etc.

serene veldtBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)