add terser

This commit is contained in:
底层用户
2023-01-14 10:59:15 +08:00
parent a4f37dbe3d
commit cf2adf6042
5 changed files with 71 additions and 7 deletions

View File

@@ -20,6 +20,7 @@
"plyr": "^3.7.3",
"qrcode.vue": "^3.3.3",
"sass": "^1.56.1",
"terser": "^5.16.1",
"vue": "^3.2.45",
"vue-router": "^4.1.6"
},

63
pnpm-lock.yaml generated
View File

@@ -13,6 +13,7 @@ specifiers:
plyr: ^3.7.3
qrcode.vue: ^3.3.3
sass: ^1.56.1
terser: ^5.16.1
unplugin-auto-import: ^0.12.0
unplugin-vue-components: ^0.22.11
vfonts: ^0.0.3
@@ -30,6 +31,7 @@ dependencies:
plyr: 3.7.3
qrcode.vue: 3.3.3_vue@3.2.45
sass: 1.56.1
terser: 5.16.1
vue: 3.2.45
vue-router: 4.1.6_vue@3.2.45
@@ -40,7 +42,7 @@ devDependencies:
unplugin-auto-import: 0.12.0
unplugin-vue-components: 0.22.11_vue@3.2.45
vfonts: 0.0.3
vite: 3.2.4_sass@1.56.1
vite: 3.2.4_sass@1.56.1+terser@5.16.1
packages:
@@ -122,6 +124,37 @@ packages:
resolution: {integrity: sha512-eWEameFXJM/1khcoKbITvKjYYXDP1WKQ/Xf9ItJVPoEjCiOdocR3AgDAERzDrNNg4oWK28gRGi+0ft8Te27zxw==}
dev: false
/@jridgewell/gen-mapping/0.3.2:
resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==}
engines: {node: '>=6.0.0'}
dependencies:
'@jridgewell/set-array': 1.1.2
'@jridgewell/sourcemap-codec': 1.4.14
'@jridgewell/trace-mapping': 0.3.17
/@jridgewell/resolve-uri/3.1.0:
resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==}
engines: {node: '>=6.0.0'}
/@jridgewell/set-array/1.1.2:
resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==}
engines: {node: '>=6.0.0'}
/@jridgewell/source-map/0.3.2:
resolution: {integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==}
dependencies:
'@jridgewell/gen-mapping': 0.3.2
'@jridgewell/trace-mapping': 0.3.17
/@jridgewell/sourcemap-codec/1.4.14:
resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==}
/@jridgewell/trace-mapping/0.3.17:
resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==}
dependencies:
'@jridgewell/resolve-uri': 3.1.0
'@jridgewell/sourcemap-codec': 1.4.14
/@juggle/resize-observer/3.4.0:
resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==}
dev: true
@@ -194,7 +227,7 @@ packages:
vite: ^3.0.0
vue: ^3.2.25
dependencies:
vite: 3.2.4_sass@1.56.1
vite: 3.2.4_sass@1.56.1+terser@5.16.1
vue: 3.2.45
dev: true
@@ -279,7 +312,6 @@ packages:
resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
/anymatch/3.1.3:
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
@@ -333,6 +365,9 @@ packages:
dependencies:
fill-range: 7.0.1
/buffer-from/1.1.2:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
/chokidar/3.5.3:
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
engines: {node: '>= 8.10.0'}
@@ -354,6 +389,9 @@ packages:
delayed-stream: 1.0.0
dev: false
/commander/2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
/core-js/3.26.1:
resolution: {integrity: sha512-21491RRQVzUn0GGM9Z1Jrpr6PNPxPi+Za8OM9q4tksTSnlbXXGKK1nXNg/QvwFYettXvSX6zWKCtHHfjN4puyA==}
requiresBuild: true
@@ -1000,6 +1038,12 @@ packages:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
/source-map-support/0.5.21:
resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}
dependencies:
buffer-from: 1.1.2
source-map: 0.6.1
/source-map/0.6.1:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
@@ -1018,6 +1062,16 @@ packages:
engines: {node: '>= 0.4'}
dev: true
/terser/5.16.1:
resolution: {integrity: sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==}
engines: {node: '>=10'}
hasBin: true
dependencies:
'@jridgewell/source-map': 0.3.2
acorn: 8.8.1
commander: 2.20.3
source-map-support: 0.5.21
/to-fast-properties/2.0.0:
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
engines: {node: '>=4'}
@@ -1125,7 +1179,7 @@ packages:
resolution: {integrity: sha512-nguyw8L6Un8eelg1vQ31vIU2ESxqid7EYmy8V+MDeMaHBqaRSkg3dTBToC1PR00D89UzS/SLkfYPnx0Wf23IQQ==}
dev: true
/vite/3.2.4_sass@1.56.1:
/vite/3.2.4_sass@1.56.1+terser@5.16.1:
resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
@@ -1155,6 +1209,7 @@ packages:
resolve: 1.22.1
rollup: 2.79.1
sass: 1.56.1
terser: 5.16.1
optionalDependencies:
fsevents: 2.3.2
dev: true

View File

@@ -58,7 +58,6 @@ onMounted(() => {
window.$mainContent = mainContent.value;
// 初始化
console.clear();
$notification["info"]({
content: "项目未完成",
meta: "最近更新:发现-排行榜页面完善",

View File

@@ -159,7 +159,7 @@ onMounted(() => {
font-size: 12px;
backdrop-filter: blur(40px);
padding: 4px 8px;
border-top-left-radius: 8px;
border-radius: 8px 0 8px 0;
}
}
.data {

View File

@@ -59,5 +59,14 @@ export default ({
'@': fileURLToPath(new URL('./src',
import.meta.url))
}
}
},
build: {
minify: 'terser',
terserOptions: {
compress: {
// 生产环境时移除 console
pure_funcs: ['console.log'],
},
},
},
})