Skip to content

Commit

Permalink
Opt: minify use esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiren233 committed Dec 26, 2023
1 parent 03bc0dd commit de61839
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
1 change: 0 additions & 1 deletion components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ declare module 'vue' {
export interface GlobalComponents {
Alist: typeof import('./src/components/fileList/alist.vue')['default']
BilibiliParse: typeof import('./src/components/cinema/dialogs/bilibiliParse.vue')['default']
copy: typeof import('./src/components/fileList/alist copy.vue')['default']
CopyButton: typeof import('./src/components/CopyButton.vue')['default']
CustomHeaders: typeof import('./src/components/cinema/dialogs/customHeaders.vue')['default']
CustomSubtitles: typeof import('./src/components/cinema/dialogs/customSubtitles.vue')['default']
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"nprogress": "^0.2.0",
"pinia": "^2.1.4",
"qrcode-vue3": "^1.6.8",
"terser": "^5.18.2",
"ts-proto": "^1.161.1",
"vue": "^3.3.4",
"vue-router": "^4.2.4"
Expand Down
13 changes: 4 additions & 9 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,14 @@ export default defineConfig({
},
build: {
cssCodeSplit: true,
minify: "terser",
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true
},
mangle: true,
toplevel: true
},
minify: "esbuild",
cssMinify: "lightningcss",
reportCompressedSize: false,
assetsInlineLimit: 0 // 禁止内敛为base64
},
esbuild: {
drop: ["console", "debugger"]
},
base: env.VITE_BASEURL,
css: {
lightningcss: {}
Expand Down

0 comments on commit de61839

Please sign in to comment.