cap-go avatar

Framework To Capacitor

If you're trying to turn a Next.js, React, or Vue app into a mobile app with Capacitor, this walks you through the entire setup. It covers the critical gotcha that Capacitor needs static exports, not SSR, and shows exactly how to configure Next.js with output: 'export', point Capacitor at the right build directory, and handle things like image optimization and routing that break in static mode. The framework support matrix is handy for checking what works. It's detailed enough that you can follow it step by step without hunting through Capacitor docs, and it includes the Live Project Snapshot commands to detect your current setup.

skills.sh installs
912
GitHub stars
77
last updated
Aug 21, 2026

Install

$ npx -y skills add cap-go/capgo-skills --skill framework-to-capacitor --agent claude-code

Installs into .claude/skills of the current project.

Files

Framework to Capacitor

Make a framework emit a static bundle that Capacitor can copy into the native projects, and wire the scripts so build -> cap sync is one step.

When to Use

TRIGGER when:

  • Adding Capacitor to a Next.js, Nuxt, Angular, SvelteKit, Vite (React/Vue/Svelte/Solid), React Router, Qwik, or Astro project.
  • npx cap sync fails with The web assets directory (./dist) must contain an index.html file. or Could not find the web assets directory: ./dist.
  • The app launches to a white screen or loads the wrong page after a reload or deep link.
  • The framework build fails because of SSR-only features (output: 'export' errors, prerender errors, API routes, middleware, server actions).

Do not use for:

  • Store readiness, native UX, permissions, billing, review risk -> webapp-to-capacitor, capacitor-app-store, capacitor-apple-review-preflight.
  • Cordova/PhoneGap apps -> cordova-to-capacitor.
  • Capacitor version upgrades -> capacitor-app-upgrades.
  • Live updates setup -> capgo-live-updates.

Project Inspection

Sponsors

Details

Repository
github.com/cap-go/capgo-skills
Categories
Frontend Development, Documentation, Mobile Development
First seen
Jun 3, 2026

More from cap-go/capgo-skills

All 41
1vtex avatarsales-app-extensibilityvtex/skillsApply when building, customizing, or deploying extensions for VTEX Sales App. Covers the complete 7-step workflow from prerequisite checks through code generati909skills.sh installs
2mindrally avatarbeautifulsoup-parsingmindrally/skillsExpert guidance for HTML/XML parsing using BeautifulSoup in Python with best practices for DOM navigation, data extraction, and efficient scraping workflows.905skills.sh installs
3mindrally avatarswrmindrally/skillsGuidelines for using SWR (stale-while-revalidate) React Hooks for efficient data fetching, caching, and revalidation902skills.sh installs
4workos avatarworkos-widgetsworkos/skillsUse when the user is implementing, embedding, or debugging a WorkOS Widget — specifically the User Management, User Profile, Admin Portal SSO Connection, or Adm885skills.sh installs
5cap-go avatarkonsta-uicap-go/capgo-skillsGuide to using Konsta UI for pixel-perfect iOS and Material Design components in Capacitor apps. Works with React, Vue, and Svelte. Use this skill when users wa874skills.sh installs
6lodev09 avatartruesheet-usagelodev09/react-native-true-sheettruesheet usage863skills.sh installs