update at 2026-03-03 21:19:52
This commit is contained in:
43
pxterm/vite.config.ts
Normal file
43
pxterm/vite.config.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
import fs from "node:fs";
|
||||
|
||||
const DEV_PUBLIC_HOST = "shell.biboer.cn";
|
||||
const DEV_CERT_PATH = "/Users/gavin/.acme.sh/shell.biboer.cn_ecc/fullchain.cer";
|
||||
const DEV_KEY_PATH = "/Users/gavin/.acme.sh/shell.biboer.cn_ecc/shell.biboer.cn.key";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
server: {
|
||||
port: 5173,
|
||||
host: DEV_PUBLIC_HOST,
|
||||
https: {
|
||||
cert: fs.readFileSync(DEV_CERT_PATH),
|
||||
key: fs.readFileSync(DEV_KEY_PATH)
|
||||
},
|
||||
proxy: {
|
||||
'/gateway-health': {
|
||||
target: 'http://localhost:8787',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/gateway-health/, '/health')
|
||||
},
|
||||
'/ws': {
|
||||
target: 'http://localhost:8787',
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
secure: false
|
||||
}
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ['@remoteconn/shared', '@remoteconn/plugin-runtime']
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
"@remoteconn/shared": fileURLToPath(new URL("./packages/shared/src/index.ts", import.meta.url)),
|
||||
"@remoteconn/plugin-runtime": fileURLToPath(new URL("./packages/plugin-runtime/src/index.ts", import.meta.url))
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user