import { fileURLToPath, URL } from "node:url"; import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; import vueJsx from "@vitejs/plugin-vue-jsx"; import { VitePWA } from "vite-plugin-pwa"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue(), vueJsx(), VitePWA({ manifest: { name: "苏康码", short_name: "苏康码", icons: [ { src: "pwa-192x192.png", sizes: "192x192", type: "image/png", }, { src: "pwa-512x512.png", sizes: "512x512", type: "image/png", }, { src: "masked-icon.svg", sizes: "512x512", type: "image/png", purpose: "any maskable", }, ], }, }), ], resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)), }, }, preview: { host: true, }, });