Converting a Nuxt site to several microsites using a monorepo and redirects

Hello all,

I have been working on breaking up a Nuxt site that was starting to get unwieldly as a single site into a monorepo structure with multiple microsites.

This includes several base pages, many many blog posts, and now we are starting to add numerous landing pages.

My journey through this has been fraught with peril, as every step has required out of the box solutioning.

Nuxt is not that happy living as a monorepo, but I figured out a way in Yarn Workspaces.

root/
netlify.toml
|  monorepo/
   yarn.lock
   | apps
     | ecommerce
     | blog
     | landing-pages
   | libs
     | components
     | assets
     | config

Netlify’s monorepo support is getting there, but there are several hoops I’ve had to jump through to get it to publish only what needs to be published at a given time.

I have created several sites, each of which are deploying only when common packages are updated or their specific app package has been updated.

I accomplished this through a combination of Github actions using a diff action during steps, as well as Netlify build hooks, while preventing auto deployment through the use of a netlify.toml file that has a rule in place for a global ignore ( I found this from a post that one of the support techs made, saying that it is undocumented )

[build]
  ignore = "exit 0"

Essentially, Netlify ignores all calls to auto deploy on branch updates, but does deploy via hooks that are being called from Github action. This is working great so far.

My next step is to set up all of the redirects in the deployed and so far experimental sites, so that I can stitch together the main pages with the blog, and shortly, landing pages.

Deployed:
https://mr-ecommerce-prettylitter.netlify.app

Deployed:
https://mr-blog-prettylitter.netlify.app/blog/

Not deployed yet:

I added the following to the beginning of the _redirects file for the https://mr-ecommerce-prettylitter.netlify.app deployment -

/blog  https://mr-blog-prettylitter.netlify.app/blog 200
/blog/* https://mr-blog-prettylitter.netlify.app/blog/:splat 200

This is working to an extent -

The site’s navigation works, I am able to get to the blog pages being proxied, however the static assets such as compiled JS and images are not being brought in, and are throwing 404s

This is my first time attempting such a feat, and I am looking for a little guidance on what I might be missing in order to get everything proxied over reliably.

Once everything is working reliably, the next step is going to be updating DNS and performing a cutover.

Thank you in advance!

Solution has been found.

hi @johncastorina ! would you mind sharing what you came up with? this may help others in the same boat.