first commit
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user