We are using a monorepo multi-site setup, where we have a single site-core package that contains all of our Astro pages + middleware. In addition, we have +- 10 apps with custom configuration, but all use the same pages in site-core by using the srcDir-option in the Astro config. Unfortunately, using this approach it is impossible to create little variations between the apps. It'd be great to be able to point at multiple srcDirs such that we can override or add pages/middleware in the apps themselves, using the site-core as a base package that can be extended with more pages. Is there currently another way to achieve this kind of setup?
#Multiple src directories
8 messages · Page 1 of 1 (latest)
Anyone?
That’s a great question! I am not really sure to be honest. Let me summon some help!
Houston, we have a problem... and <@&1129102257422610512>, you’re our mission control! 🚀
I feel like you could make site-core an integration and achieve your desired behavior
Yeah, this could be achieved with an integration or by using an overlay filesystem (what docker uses), so it gets what's on the lower layer but allows any override.
Tho setting up an overlay FS manually is a bit finicky
Thanks for your replies. We'd like to stick to the "natural" Astro as much as possible, so in that case building an integration would be the way, right? I think that'll work, I'll keep you posted!
Hey Tim! I'm very interested in your setup. Is there any chance you have written an article about it somewhere?