db528eefa8a6
add build:mobile script to package.json and create vite.config.mobile.ts for Android/iOS WebView bundle
- time
- 2026-05-05 00:43 UTC · 5 months ago
- machine
- koh2
- parent
- 4ec3741cd316
↓ peach-browser-db528eef.tar.gzatlas at this save
files changed2 files
package.json+2 −1vite.config.mobile.ts+25 −0package.json+2 −1
@@ -5,9 +5,10 @@55 "type": "module",66 "scripts": {77 "dev": "vite",8- "build": "npm run build:chrome && npm run build:firefox",8+ "build": "npm run build:chrome && npm run build:firefox && npm run build:mobile",99 "build:chrome": "node scripts/clean-chrome-dist.mjs && BUILD_TARGET=chrome vite build && node scripts/sync-chrome-dist.mjs",1010 "build:firefox": "node scripts/clean-firefox-artifacts.mjs && BUILD_TARGET=firefox vite build",11+ "build:mobile": "vite build --config vite.config.mobile.ts",1112 "build:e2e": "PEACH_E2E_PASSKEYS=1 BUILD_TARGET=chrome vite build && node scripts/sync-chrome-dist.mjs",1213 "package:firefox": "node scripts/clean-firefox-artifacts.mjs && npm run build:firefox && cd dist-firefox && web-ext build --overwrite-dest",1314 "typecheck": "tsc --noEmit",vite.config.mobile.ts+25 −0
@@ -0,0 +1,25 @@1+import { defineConfig } from "vite";2+import solid from "vite-plugin-solid";3+4+export default defineConfig({5+ plugins: [solid()],6+ base: "./",7+ define: {8+ __BUILD_TIME__: JSON.stringify(9+ new Date().toLocaleTimeString([], {10+ hour: "2-digit",11+ minute: "2-digit",12+ second: "2-digit",13+ })14+ ),15+ __VERSION__: JSON.stringify(process.env.npm_package_version ?? "0.0.0"),16+ },17+ build: {18+ outDir: "dist-mobile",19+ emptyOutDir: false,20+ target: "esnext",21+ rollupOptions: {22+ input: "src/popup/index.html",23+ },24+ },25+});\ No newline at end of file