vite.config.mobile.ts

848 B · raw

1import { defineConfig } from "vite";2import solid from "vite-plugin-solid";34export 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    // passkey.ts references this at module init via PASSKEY_CREATE_E2E_BYPASS.17    // Must be replaced at build time or the popup boot throws ReferenceError18    // and every sendMessage on Android sits in the shim queue forever.19    __PEACH_E2E_PASSKEYS__: JSON.stringify(false),20  },21  build: {22    outDir: "dist-mobile",23    emptyOutDir: false,24    target: "esnext",25    rollupOptions: {26      input: "src/popup/index.html",27    },28  },29});