Files
2026-03-18 22:00:41 +08:00

49 lines
1.2 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { VitePWA } from "vite-plugin-pwa";
export default defineConfig({
plugins: [
vue(),
VitePWA({
registerType: "autoUpdate",
includeAssets: ["favicon.ico", "logo.png", "logo192.png", "logo512.png"],
manifest: {
name: "萌芽SSH",
short_name: "萌芽SSH",
description: "柔和渐变风格的 Web SSH 连接面板,支持多窗口终端。",
start_url: "/",
display: "standalone",
theme_color: "#0f172a",
background_color: "#020617",
icons: [
{
src: "logo192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "logo512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
}),
],
server: {
host: true,
port: 5173,
proxy: {
// HTTP API/api/... → http://localhost:8080/api/...
"/api": {
target: "http://localhost:8080",
changeOrigin: true,
// WebSocket 升级ws:// / wss://
ws: true,
},
},
},
});