Spaces:
Sleeping
Sleeping
eeshaAI commited on
Commit ·
38dd284
1
Parent(s): aa6c85a
feat: Capacitor + Capgo OTA setup — config, build scripts, API_BASE auto-detect
Browse filesFiles changed (4)
- capacitor.config.tsAdded+27
- next.config.apk.tsAdded+9
- next.config.web.tsAdded+19
- scripts/build-apk.shAdded+12
123456789101112131415161718192021222324252627import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = { appId: 'com.cellex.app', appName: 'Cellex', webDir: 'out', server: { androidScheme: 'https', }, plugins: { SplashScreen: { launchShowDuration: 1500, backgroundColor: '#ffffff', showSpinner: false, androidScaleType: 'CENTER_CROP', splashFullScreen: true, splashImmersive: false, }, CapacitorUpdater: { autoUpdate: true, channel: 'production', resetWhenUpdate: true, }, },};
export default config;123456789import type { NextConfig } from "next";const nextConfig: NextConfig = { output: "export", typescript: { ignoreBuildErrors: true }, eslint: { ignoreDuringBuilds: true }, reactStrictMode: false, images: { unoptimized: true },};export default nextConfig;12345678910111213141516171819import type { NextConfig } from "next";
const nextConfig: NextConfig = { output: "standalone", typescript: { ignoreBuildErrors: true, }, reactStrictMode: false, // Allow running behind Hugging Face Spaces reverse proxy experimental: { serverActions: { allowedOrigins: ['*.hf.space', '*.space-z.ai'], }, }, compress: true, poweredByHeader: false,};
export default nextConfig;123456789101112#!/bin/bashset -eecho "=== Building APK static export ==="cp next.config.ts next.config.web.tscp next.config.apk.ts next.config.tsmv src/app/api /tmp/cellex-api-saferm -rf .nextnpm run buildmv /tmp/cellex-api-safe src/app/apicp next.config.web.ts next.config.tsnpx cap sync android 2>/dev/null || echo "(Run npm run cap:add:android first)"echo "✅ Static export ready in /out"capacitor.config.tsAdded+27
next.config.apk.tsAdded+9
next.config.web.tsAdded+19
scripts/build-apk.shAdded+12