[release-2.8] chore: use rollup-plugin-gzip instead of vite-compression-plugin (#4364)

This is an automated cherry-pick of #4354

/assign ruibaby

```release-note
None
```
release-2.8
Halo Dev Bot 2023-08-02 21:30:26 +08:00 committed by GitHub
parent 300c73c527
commit 030b2076ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 27 deletions

View File

@ -139,6 +139,7 @@
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.1.13",
"randomstring": "^1.2.3",
"rollup-plugin-gzip": "^3.1.0",
"sass": "^1.56.2",
"start-server-and-test": "^1.14.0",
"tailwindcss": "^3.2.7",
@ -147,7 +148,6 @@
"typescript": "~5.0.4",
"unplugin-icons": "^0.14.15",
"vite": "^4.0.4",
"vite-compression-plugin": "^0.0.4",
"vite-plugin-externals": "^0.6.2",
"vite-plugin-html": "^3.2.0",
"vite-plugin-pwa": "^0.13.3",

View File

@ -215,7 +215,7 @@ importers:
version: 1.1.22
'@intlify/unplugin-vue-i18n':
specifier: ^0.9.3
version: 0.9.3(rollup@2.79.1)(vue-i18n@9.3.0-beta.19)
version: 0.9.3(rollup@3.9.1)(vue-i18n@9.3.0-beta.19)
'@rushstack/eslint-patch':
specifier: ^1.3.2
version: 1.3.2
@ -318,6 +318,9 @@ importers:
randomstring:
specifier: ^1.2.3
version: 1.2.3
rollup-plugin-gzip:
specifier: ^3.1.0
version: 3.1.0(rollup@3.9.1)
sass:
specifier: ^1.56.2
version: 1.60.0
@ -342,9 +345,6 @@ importers:
vite:
specifier: ^4.0.4
version: 4.0.4(@types/node@18.13.0)(sass@1.60.0)
vite-compression-plugin:
specifier: ^0.0.4
version: 0.0.4
vite-plugin-externals:
specifier: ^0.6.2
version: 0.6.2(vite@4.0.4)
@ -414,7 +414,7 @@ importers:
version: 0.14.15(@vue/compiler-sfc@3.2.45)
vite-plugin-dts:
specifier: ^2.3.0
version: 2.3.0(@types/node@18.13.0)(rollup@2.79.1)(vite@3.2.4)
version: 2.3.0(@types/node@18.13.0)(rollup@3.9.1)(vite@3.2.4)
packages/shared:
dependencies:
@ -430,7 +430,7 @@ importers:
devDependencies:
vite-plugin-dts:
specifier: ^2.3.0
version: 2.3.0(@types/node@18.13.0)(rollup@2.79.1)(vite@4.0.4)
version: 2.3.0(@types/node@18.13.0)(rollup@3.9.1)(vite@4.0.4)
packages:
@ -2813,7 +2813,7 @@ packages:
engines: {node: '>= 16'}
dev: true
/@intlify/unplugin-vue-i18n@0.9.3(rollup@2.79.1)(vue-i18n@9.3.0-beta.19):
/@intlify/unplugin-vue-i18n@0.9.3(rollup@3.9.1)(vue-i18n@9.3.0-beta.19):
resolution: {integrity: sha512-23DMh2r0qA7UZfaQhF09ZHhifgTyKcbmVsCo+qHvu9q1EU8OF18VlhxMHMksDR5NBDvRXj3Lmu8lT84XDrUlSw==}
engines: {node: '>= 14.16'}
peerDependencies:
@ -2830,7 +2830,7 @@ packages:
dependencies:
'@intlify/bundle-utils': 5.5.0(vue-i18n@9.3.0-beta.19)
'@intlify/shared': 9.3.0-beta.24
'@rollup/pluginutils': 5.0.2(rollup@2.79.1)
'@rollup/pluginutils': 5.0.2(rollup@3.9.1)
'@vue/compiler-sfc': 3.2.47
debug: 4.3.4(supports-color@8.1.1)
fast-glob: 3.2.12
@ -3311,7 +3311,7 @@ packages:
picomatch: 2.3.1
dev: true
/@rollup/pluginutils@5.0.2(rollup@2.79.1):
/@rollup/pluginutils@5.0.2(rollup@3.9.1):
resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==}
engines: {node: '>=14.0.0'}
peerDependencies:
@ -3323,7 +3323,7 @@ packages:
'@types/estree': 1.0.0
estree-walker: 2.0.2
picomatch: 2.3.1
rollup: 2.79.1
rollup: 3.9.1
dev: true
/@rushstack/eslint-patch@1.3.2:
@ -9811,6 +9811,15 @@ packages:
- supports-color
dev: true
/rollup-plugin-gzip@3.1.0(rollup@3.9.1):
resolution: {integrity: sha512-PFS9s6/w6dCra6/Z8PGD+ug3aaaqKLDCbr5y1Ek71Wd4rQSmMnOqCIIMgwbYxZ9A/gjP3pCN6rA4pAG47jxF0w==}
engines: {node: '>=10.0.0'}
peerDependencies:
rollup: '>=2.0.0'
dependencies:
rollup: 3.9.1
dev: true
/rollup-plugin-terser@7.0.2(rollup@2.79.1):
resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==}
deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
@ -11025,15 +11034,6 @@ packages:
extsprintf: 1.3.0
dev: true
/vite-compression-plugin@0.0.4:
resolution: {integrity: sha512-HvjhSAL+BDCqZIClYk8bbH7ozjIipf7Z5Bn5KEh+2Y0usTXvdyS20rQSM/EuF36WXBnksGyc5CJGqijf3Br0Ug==}
deprecated: migrate to vite-plugin-compression2
dependencies:
chalk: 4.1.2
fast-glob: 3.2.12
fs-extra: 10.1.0
dev: true
/vite-node@0.23.4(@types/node@18.13.0)(sass@1.60.0):
resolution: {integrity: sha512-8VuDGwTWIvwPYcbw8ZycMlwAwqCmqZfLdFrDK75+o+6bWYpede58k6AAXN9ioU+icW82V4u1MzkxLVhhIoQ9xA==}
engines: {node: '>=v14.16.0'}
@ -11053,7 +11053,7 @@ packages:
- terser
dev: true
/vite-plugin-dts@2.3.0(@types/node@18.13.0)(rollup@2.79.1)(vite@3.2.4):
/vite-plugin-dts@2.3.0(@types/node@18.13.0)(rollup@3.9.1)(vite@3.2.4):
resolution: {integrity: sha512-WbJgGtsStgQhdm3EosYmIdTGbag5YQpZ3HXWUAPCDyoXI5qN6EY0V7NXq0lAmnv9hVQsvh0htbYcg0Or5Db9JQ==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
@ -11061,7 +11061,7 @@ packages:
dependencies:
'@babel/parser': 7.22.5
'@microsoft/api-extractor': 7.36.0(@types/node@18.13.0)
'@rollup/pluginutils': 5.0.2(rollup@2.79.1)
'@rollup/pluginutils': 5.0.2(rollup@3.9.1)
'@rushstack/node-core-library': 3.59.4(@types/node@18.13.0)
debug: 4.3.4(supports-color@8.1.1)
fast-glob: 3.2.12
@ -11076,7 +11076,7 @@ packages:
- supports-color
dev: true
/vite-plugin-dts@2.3.0(@types/node@18.13.0)(rollup@2.79.1)(vite@4.0.4):
/vite-plugin-dts@2.3.0(@types/node@18.13.0)(rollup@3.9.1)(vite@4.0.4):
resolution: {integrity: sha512-WbJgGtsStgQhdm3EosYmIdTGbag5YQpZ3HXWUAPCDyoXI5qN6EY0V7NXq0lAmnv9hVQsvh0htbYcg0Or5Db9JQ==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
@ -11084,7 +11084,7 @@ packages:
dependencies:
'@babel/parser': 7.22.5
'@microsoft/api-extractor': 7.36.0(@types/node@18.13.0)
'@rollup/pluginutils': 5.0.2(rollup@2.79.1)
'@rollup/pluginutils': 5.0.2(rollup@3.9.1)
'@rushstack/node-core-library': 3.59.4(@types/node@18.13.0)
debug: 4.3.4(supports-color@8.1.1)
fast-glob: 3.2.12

View File

@ -1,19 +1,19 @@
import { fileURLToPath, URL } from "url";
import fs from "fs";
import path from "path";
import { defineConfig, loadEnv } from "vite";
import { defineConfig, loadEnv, Plugin } from "vite";
import Vue from "@vitejs/plugin-vue";
import VueJsx from "@vitejs/plugin-vue-jsx";
import Compression from "vite-compression-plugin";
import { VitePWA } from "vite-plugin-pwa";
import Icons from "unplugin-icons/vite";
import { setupLibraryExternal } from "./src/build/library-external";
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
import GzipPlugin from "rollup-plugin-gzip";
export const sharedPlugins = [
Vue(),
VueJsx(),
Compression(),
GzipPlugin() as Plugin,
Icons({
compiler: "vue3",
customCollections: {