Browse Source

移除压缩包

李富豪 1 year ago
parent
commit
3812f2c117
3 changed files with 15 additions and 22 deletions
  1. 11 21
      Web/.gitignore
  2. BIN
      Web/dist.zip
  3. 4 1
      Web/vite.config.ts

+ 11 - 21
Web/.gitignore

@@ -1,25 +1,15 @@
-node_modules
+# 系统文件
 .DS_Store
-dist
-dist-ssr
-*.local
-node_modules/
+.rar
+.zip
 
-# Log files
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
+# 编辑器配置
+.vscode/
+.idea/
 
-# Editor directories and files
-.idea
-# .vscode
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
+# 项目依赖
+node_modules
 
-.history
-/coverage
-/backup
-node_modules
+# 打包文件
+/build
+/dist

BIN
Web/dist.zip


+ 4 - 1
Web/vite.config.ts

@@ -45,11 +45,14 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => defineConfig(
     }
   },
   build: {
-    // target: ['es2015'], // 最低支持 es2015
+    outDir: 'build',// 指定打包文件根目录
     sourcemap: false,// 构建后不生成源代码
     write: true,// 构建的文件写入磁盘
     chunkSizeWarningLimit: 10240,// 触发警告的chunk大小10M
   },
+  esbuild: {
+    drop: mode === 'production' ? ['console', 'debugger'] : [],
+  },
   plugins: [
     vue(),
     viteVConsole({