Share code between 2 Nuxt apps/repos (happy to pay for a consultation)
Hey!
I have a Nuxt 3 web app as well as a mobile app using Nuxt + Capacitor.
The capacitor repo is a slightly modified version of the webapp, with maybe 2 or 3 files difference.
My problem is:
Every time I update the web app repo, I have to manually update the capacitor repo.
Would there be a way for my capacitor repo to use the code from the web app as default, except for the few different files? Like, I just add some files and it override the default or something
I checked Nuxt Layers (https://nuxt.com/docs/getting-started/layers) but I'm not sure if that's what I need, there is too little informations on the page
Summary:
- The web app repo includes a static blog, landing page, etc
- The core of the app is inside a /app folder
- The capacitor app only needs the /app folder
- There are only a couple of files that are different in the capacitor repo (to handle payments and auth mainly)
What I'd like:
- When I make some change in my files on the webapp repo, the mobile repo automatically updates
- Ideally without "duplicating" the files, just using the ones from the webapp repo
As mentioned in the title, I'm happy to pay someone for their time if that's something complex to explain/setup π
Nuxt
Layers Β· Get Started with Nuxt
Nuxt provides a powerful system that allows you to extend the default files, configs, and much more.

8 Replies
(Tried to make a visual representation of what I mean, not sure if it's clear)
Unknown Userβ’13mo ago
Message Not Public
Sign In & Join Server To View
That's what seems to be the easiest solution, but it would involve adding capacitor to the main app directly
Unknown Userβ’13mo ago
Message Not Public
Sign In & Join Server To View
I have 2 Nuxt apps on my laptop, one webapp, and one for the mobile app
After updating the web-app, I'd have to go on the mobile app nuxt app and manually re-make every change I did
Oh you mean the mobile app wouldn't contain anything other than a redirect to /app? And it would load the website?
Because there are a few differences, to handle payments I use separate plugins
Unknown Userβ’13mo ago
Message Not Public
Sign In & Join Server To View
But then Apple would reject it because it doesn't use their checkout, I need to have a special plugin in the app directly
Unknown Userβ’13mo ago
Message Not Public
Sign In & Join Server To View