前端开发

framework-to-capacitor

cap-go/capgo-skills

Configures a web framework build so Capacitor can ship it as an iOS/Android app. Use for Next.js static export (output 'export', out/), Nuxt 4 (ssr false, nuxt generate, .output/public), Angular (dist/<project>/browser), SvelteKit adapter-static (SvelteKit 2 svelte.config.js or SvelteKit 3 vite.config), React/Vue/Svelte/Solid on Vite, and React Router framework SPA mode. Covers webDir mismatch, blank white screen after cap sync, missing index.html, SSR/API routes/middleware/server actions that cannot run in the app, next/image errors, deep-link reloads landing on the home page, router base paths, and env variables. Do not use for whole-app store readiness (webapp-to-capacitor), Cordova projects (cordova-to-capacitor), Capacitor major upgrades (capacitor-app-upgrades), or UI kits (ionic-design, konsta-ui, tailwind-capacitor).

  • 879 次安装
  • 74 星标
  • 收录于

安装命令

npx skills add https://github.com/cap-go/capgo-skills --skill framework-to-capacitor

SKILL.md

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.

Live Project Snapshot

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.

Live Project Snapshot