Skip to content

Commit fb7f4da

Browse files
committed
build: 优化项目构建配置
- 修改 .gitignore 文件,移除不必要的忽略路径 - 更新 vite.config.js,添加相对路径基础配置
1 parent d9700f5 commit fb7f4da

6 files changed

+84
-14
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ lerna-debug.log*
99

1010
node_modules
1111
.DS_Store
12-
dist
13-
dist-ssr
1412
coverage
1513
*.local
1614

dist/assets/index-BSg6JReu.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assets/index-CYOe4rX2.js

+67
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/favicon.ico

4.19 KB
Binary file not shown.

dist/index.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="UTF-8">
5+
<link rel="icon" href="./favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Vite App</title>
8+
<script type="module" crossorigin src="./assets/index-CYOe4rX2.js"></script>
9+
<link rel="stylesheet" crossorigin href="./assets/index-BSg6JReu.css">
10+
</head>
11+
<body>
12+
<div id="app"></div>
13+
</body>
14+
</html>

vite.config.js

+2-12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import tailwindcss from '@tailwindcss/vite'
77

88
// https://vite.dev/config/
99
export default defineConfig({
10+
base: './', // Add this line to use relative paths
1011
plugins: [
1112
vue(),
1213
vueDevTools(),
@@ -16,16 +17,5 @@ export default defineConfig({
1617
alias: {
1718
'@': fileURLToPath(new URL('./src', import.meta.url))
1819
},
19-
},
20-
// server: {
21-
// host: '0.0.0.0', // 添加这行来监听所有网络接口
22-
// port: 8080, // 可选:指定端口号
23-
// proxy: {
24-
// '/api': {
25-
// target: 'http://localhost:8000',
26-
// changeOrigin: true,
27-
// rewrite: (path) => path
28-
// }
29-
// }
30-
// }
20+
}
3121
})

0 commit comments

Comments
 (0)