Skip to content

Commit 6e3ca5b

Browse files
committed
update: 一些小调整
1 parent bf64f1b commit 6e3ca5b

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "NodePassDash",
33
"private": true,
4-
"version": "3.1.0-beta1",
4+
"version": "3.1.0-beta2",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

web/vite.config.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import { readFileSync } from "fs";
2+
13
import { defineConfig } from "vite";
24
import react from "@vitejs/plugin-react";
35
import tsconfigPaths from "vite-tsconfig-paths";
4-
import { readFileSync } from "fs";
5-
import tailwindcss from "@tailwindcss/vite"
6+
import tailwindcss from "@tailwindcss/vite";
67

78
// 读取package.json获取版本号
89
const packageJson = JSON.parse(readFileSync("./package.json", "utf-8"));
@@ -12,24 +13,24 @@ export default defineConfig(({ mode }) => ({
1213
plugins: [react(), tsconfigPaths(), tailwindcss()],
1314
define: {
1415
__APP_VERSION__: JSON.stringify(packageJson.version),
15-
__DEV_MODE__: JSON.stringify(mode === 'development'),
16+
__DEV_MODE__: JSON.stringify(mode === "development"),
1617
},
1718
build: {
18-
outDir: '../cmd/server/dist',
19+
outDir: "../cmd/server/dist",
1920
},
2021
server: {
2122
proxy: {
22-
'/api': {
23-
target: process.env.VITE_API_BASE || 'http://localhost:3000',
23+
"/api": {
24+
target: process.env.VITE_API_BASE || "http://localhost:3000",
2425
changeOrigin: true,
2526
secure: false,
2627
ws: true, // 启用 WebSocket 代理
2728
},
28-
'/docs-proxy': {
29-
target: 'https://raw.githubusercontent.com',
29+
"/docs-proxy": {
30+
target: "https://raw.githubusercontent.com",
3031
changeOrigin: true,
3132
secure: true,
32-
rewrite: (path) => path.replace(/^\/docs-proxy/, ''),
33+
rewrite: (path) => path.replace(/^\/docs-proxy/, ""),
3334
},
3435
},
3536
},

0 commit comments

Comments
 (0)