Framework guides

Capacitor & Ionic

Lunadeck provides first-class support for Capacitor and Ionic apps. Whether you're using Ionic with Angular, React, or Vue — or Capacitor standalone — Lunadeck handles the native compilation.

How it works

  1. Your web app is built using your standard build command
  2. The output is synced to the Capacitor Android project
  3. Gradle compiles the final APK

Requirements

  • Capacitor 5.0 or later
  • A capacitor.config.ts or capacitor.config.json
  • The @capacitor/android package installed

Project setup

Ensure your project has a Capacitor configuration:

// capacitor.config.ts
import type { CapacitorConfig } from "@capacitor/cli";
 
const config: CapacitorConfig = {
  appId: "com.mycompany.myapp",
  appName: "My App",
  webDir: "dist",
};
 
export default config;

Ionic-specific features

If you're using Ionic, Lunadeck also detects:

  • Ionic configuration (ionic.config.json)
  • Ionic-specific build commands
  • Ionic native plugins

Capacitor plugins

All official Capacitor plugins are supported out of the box:

  • @capacitor/camera
  • @capacitor/filesystem
  • @capacitor/geolocation
  • @capacitor/push-notifications
  • And many more

Community plugins are also supported as long as they have proper Android implementations.

Troubleshooting

  • Web assets not found — Ensure webDir in capacitor.config.ts matches your build output directory
  • Plugin not found — Run npx cap sync locally to verify plugin installation
  • Gradle errors — Check that your android/ directory is up to date with npx cap sync android