Hey @banjerluke! Great to see your work on this approach. Even if it feels a bit hacky, having it running is a big relief each time, I know that.
I have a few comments:
Dev mode: What worked for me was relying on Capacitor’s built-in live reload. If you update the www folder (in your case capacitor/www-dist), changes reload automatically. For development mode only, I use this in my Capacitor config:
"server": {
"url": "http://{{LOCAL_IP}}:{{PORT}}",
"cleartext": true
},
The tricky part is enabling a watcher that runs your build script whenever changes happen in Meteor’s Cordova context (.meteor/local/build/programs/web.cordova). In my setup, dev mode runs Meteor with the Cordova arch enabled, plus a background watcher on that folder. Any effective change from Meteor triggers my process to rebuild www-dist, which then refreshes automatically in the emulator.
HCP: Making cordova-plugin-meteor-webapp work with Capacitor is nice, but it might conflict with Capacitor’s own local webview/server. I didn’t go too deep into it, since the Capgo approach felt smoother and easier to reason about. Meteor HCP does a lot for what is essentially just replacing the native bundle.
Capgo can be used without their paid service. I used its API (CapacitorUpdater.download / CapacitorUpdater.set, and having much more utilities) to build a simple mechanism that prompts an update if a new bundle is available in a AWS S3 bucket and the user is on an older native build. That bucket just holds the zipped, versioned www-dist. Capgo fetches and replaces it cleanly. I could have used Meteor’s own express app to serve the bundle, but chose S3 to offload it. Still, I may experiment with a more integrated express-based approach when I go deeper into Meteor–CapacitorJS integration. But having cordova-plugin-meteor-webapp compatible with your experiments would also be great!