1import { defineConfig } from "vite";2import solidPlugin from "vite-plugin-solid";34export default defineConfig({5 plugins: [6 solidPlugin(),7 {8 name: "mobile-body-class",9 transformIndexHtml(html) {10 return html.replace("<body>", '<body class="peach-mobile">');11 },12 },13 ],14 build: {15 outDir: "dist-mobile",16 emptyOutDir: false,17 target: "esnext",18 rollupOptions: {19 input: "src/popup/index.html",20 plugins: [21 {22 23 24 25 apply: "build",26 enforce: "pre",27 transform(code, id) {28 if (id.includes("src/popup/index")) {29 return {30 code: `import "../shared/chrome-shim";\n${code}`,31 map: null,32 };33 }34 return null;35 },36 },37 ],38 },39 },40 define: {41 "import.meta.env.PEACH_PLATFORM": JSON.stringify("android"),42 },43});