first commit

This commit is contained in:
2026-06-14 20:31:10 +08:00
parent c33b143176
commit 1ed3f576fa
51 changed files with 3362 additions and 810 deletions

View File

@@ -45,7 +45,8 @@ export default defineConfig(({ mode }) => {
},
workbox: {
navigateFallback: "index.html",
globPatterns: ["**/*.{js,css,html,png,ico,woff2}"],
globPatterns: ["**/*.{js,css,html,png,ico}"],
globIgnores: ["**/fonts/**"],
runtimeCaching: isDesktop
? [
{
@@ -70,10 +71,33 @@ export default defineConfig(({ mode }) => {
build: {
outDir: isDesktop ? "dist-desketop" : "dist",
emptyOutDir: true,
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes("node_modules/react-dom") || id.includes("node_modules/react/")) {
return "react-vendor";
}
if (id.includes("node_modules/react-router") || id.includes("node_modules/@remix-run/router")) {
return "router-vendor";
}
if (id.includes("node_modules/@xterm")) {
return "xterm-vendor";
}
if (id.includes("node_modules/highlight.js") || id.includes("node_modules/marked")) {
return "markdown-vendor";
}
},
},
},
},
server: {
host: "0.0.0.0",
port: 5173,
proxy: {
"/api": "http://localhost:19133",
"/api": {
target: "http://127.0.0.1:19133",
ws: true,
},
},
},
};