compress wechat
This commit is contained in:
2043
frontend/wechat/package-lock.json
generated
Normal file
2043
frontend/wechat/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -12,15 +12,12 @@
|
||||
"@tailwindcss/vite": "^4.1.4",
|
||||
"@vueuse/core": "^13.1.0",
|
||||
"axios": "^1.8.4",
|
||||
"dplayer": "^1.27.1",
|
||||
"pinia": "^3.0.2",
|
||||
"plyr": "^3.7.8",
|
||||
"sha1": "^1.1.1",
|
||||
"tailwindcss": "^4.1.4",
|
||||
"vue": "^3.5.13",
|
||||
"vue-icons-plus": "^0.1.8",
|
||||
"vue-router": "^4.5.0",
|
||||
"wechat-js-sdk": "^1.3.3",
|
||||
"weixin-js-sdk": "^1.6.5",
|
||||
"xgplayer": "^3.0.22",
|
||||
"xgplayer-mp4": "^3.0.22"
|
||||
@@ -29,6 +26,9 @@
|
||||
"@vitejs/plugin-vue": "^5.2.2",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"postcss": "^8.5.3",
|
||||
"vite": "^6.3.0"
|
||||
"rollup-plugin-visualizer": "^5.14.0",
|
||||
"terser": "^5.39.0",
|
||||
"vite": "^6.3.0",
|
||||
"vite-plugin-compression": "^0.5.1"
|
||||
}
|
||||
}
|
||||
4949
frontend/wechat/stats.html
Normal file
4949
frontend/wechat/stats.html
Normal file
File diff suppressed because one or more lines are too long
@@ -1,14 +1,26 @@
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import { resolve } from 'path';
|
||||
import { visualizer } from 'rollup-plugin-visualizer';
|
||||
import { defineConfig } from 'vite';
|
||||
import compression from 'vite-plugin-compression';
|
||||
|
||||
export default defineConfig({
|
||||
minify: true,
|
||||
sourceMap: true,
|
||||
plugins: [
|
||||
vue(),
|
||||
tailwindcss(),
|
||||
compression({
|
||||
verbose: true,
|
||||
disable: false,
|
||||
threshold: 10240,
|
||||
algorithm: 'gzip',
|
||||
ext: '.gz',
|
||||
}),
|
||||
visualizer({
|
||||
open: true,
|
||||
gzipSize: true,
|
||||
brotliSize: true,
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
@@ -16,12 +28,31 @@ export default defineConfig({
|
||||
}
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
allowedHosts: ['mp.jdwan.com'],
|
||||
host: '0.0.0.0',
|
||||
allowedHosts: ['mp.jdwan.com'],
|
||||
port: 3001,
|
||||
open: true,
|
||||
proxy: {
|
||||
'/v1': 'http://localhost:8088',
|
||||
}
|
||||
},
|
||||
build: {
|
||||
sourceMap: true,
|
||||
minify: 'terser',
|
||||
chunkSizeWarningLimit: 1500,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
'vue-vendor': ['vue', 'vue-router', 'pinia'],
|
||||
'player-vendor': ['xgplayer', 'xgplayer-mp4'],
|
||||
}
|
||||
}
|
||||
},
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_debugger: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user