Skip to content

Commit e8fe9d0

Browse files
committed
init
1 parent 5cb3731 commit e8fe9d0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

DEPLOYMENT.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,16 @@ git push origin main
7878

7979
### 构建失败
8080

81+
#### Terser 错误
82+
如果遇到 "terser not found" 错误:
83+
- 已修复:将 `minify: 'terser'` 改为 `minify: 'esbuild'`
84+
- esbuild 是 Vite 的默认压缩器,无需额外安装
85+
86+
#### 其他构建问题
8187
1. 检查Node.js版本兼容性
8288
2. 确保所有依赖都已正确安装
8389
3. 查看Actions日志中的错误信息
90+
4. 检查是否有TypeScript类型错误
8491

8592
### 页面无法访问
8693

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default defineConfig(({ mode }) => ({
2020
outDir: 'dist',
2121
assetsDir: 'assets',
2222
sourcemap: false,
23-
minify: 'terser',
23+
minify: 'esbuild',
2424
rollupOptions: {
2525
output: {
2626
manualChunks: {

0 commit comments

Comments
 (0)