From 993538de21dbb9e54e308afb40ff096ba0ab0e19 Mon Sep 17 00:00:00 2001 From: vben Date: Sat, 13 Feb 2021 00:26:41 +0800 Subject: [PATCH] feat: added brotli|gzip compression and related test commands --- .env.production | 6 +- CHANGELOG.zh_CN.md | 1 + README.md | 1 + README.zh-CN.md | 1 + build/utils.ts | 9 +- build/vite/plugin/compress.ts | 29 +++++ build/vite/plugin/gzip.ts | 17 --- build/vite/plugin/index.ts | 6 +- package.json | 21 ++-- vite.config.ts | 17 +-- yarn.lock | 208 ++++++++++++++++++++++++++-------- 11 files changed, 225 insertions(+), 91 deletions(-) create mode 100644 build/vite/plugin/compress.ts delete mode 100644 build/vite/plugin/gzip.ts diff --git a/.env.production b/.env.production index 09db4ced..2e7490da 100644 --- a/.env.production +++ b/.env.production @@ -7,8 +7,10 @@ VITE_PUBLIC_PATH = / # Delete console VITE_DROP_CONSOLE = true -# Whether to output gz file for packaging -VITE_BUILD_GZIP = false +# Whether to enable gizp or brotli compression +# Optional: gzip | brotli | none +# If you need multiple forms, you can use `,` to separate +VITE_BUILD_COMPRESS = 'gzip' # Basic interface address SPA VITE_GLOB_API_URL=/api diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index 8a9a9cab..b9f75e60 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -4,6 +4,7 @@ - useModal 新增返回值函数 `redoModalHeight`,用于在 modal 内为动态内容时刷新 modal 高度 - 升级 husky 到 5.0 +- 新增 `brotli`|`gzip`压缩及相关测试命令 ### 🐛 Bug Fixes diff --git a/README.md b/README.md index 41ffdb01..c13d3091 100644 --- a/README.md +++ b/README.md @@ -257,3 +257,4 @@ If these plugins are helpful to you, you can give a star - [vite-plugin-style-import](https://github.com/anncwb/vite-plugin-style-import) - [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - [vite-plugin-imagemin](https://github.com/anncwb/vite-plugin-imagemin) +- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) diff --git a/README.zh-CN.md b/README.zh-CN.md index d6703331..27ed9daa 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -260,6 +260,7 @@ yarn clean:lib # 删除node_modules,兼容window系统 - [vite-plugin-style-import](https://github.com/anncwb/vite-plugin-style-import) - [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - [vite-plugin-imagemin](https://github.com/anncwb/vite-plugin-imagemin) +- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) ## 加入我们 diff --git a/build/utils.ts b/build/utils.ts index b27e571a..0236ea6b 100644 --- a/build/utils.ts +++ b/build/utils.ts @@ -23,13 +23,6 @@ export function isReportMode(): boolean { return process.env.REPORT === 'true'; } -/** - * Whether to generate gzip for packaging - */ -export function isBuildGzip(): boolean { - return process.env.VITE_BUILD_GZIP === 'true'; -} - export interface ViteEnv { VITE_PORT: number; VITE_USE_MOCK: boolean; @@ -40,7 +33,7 @@ export interface ViteEnv { VITE_GLOB_APP_SHORT_NAME: string; VITE_USE_CDN: boolean; VITE_DROP_CONSOLE: boolean; - VITE_BUILD_GZIP: boolean; + VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none'; VITE_DYNAMIC_IMPORT: boolean; VITE_LEGACY: boolean; VITE_USE_IMAGEMIN: boolean; diff --git a/build/vite/plugin/compress.ts b/build/vite/plugin/compress.ts new file mode 100644 index 00000000..3ad6c63f --- /dev/null +++ b/build/vite/plugin/compress.ts @@ -0,0 +1,29 @@ +/** + * Used to package and output gzip. Note that this does not work properly in Vite, the specific reason is still being investigated + */ +import type { Plugin } from 'vite'; + +import compressPlugin from 'vite-plugin-compression'; + +export function configCompressPlugin(compress: 'gzip' | 'brotli' | 'none'): Plugin | Plugin[] { + const compressList = compress.split(','); + + const plugins: Plugin[] = []; + + if (compressList.includes('gzip')) { + plugins.push( + compressPlugin({ + ext: '.gz', + }) + ); + } + if (compressList.includes('brotli')) { + plugins.push( + compressPlugin({ + ext: '.br', + algorithm: 'brotliCompress', + }) + ); + } + return plugins; +} diff --git a/build/vite/plugin/gzip.ts b/build/vite/plugin/gzip.ts deleted file mode 100644 index 600c35e1..00000000 --- a/build/vite/plugin/gzip.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Used to package and output gzip. Note that this does not work properly in Vite, the specific reason is still being investigated - */ -import type { Plugin } from 'vite'; - -import gzipPlugin from 'rollup-plugin-gzip'; -import { isBuildGzip } from '../../utils'; - -export function configGzipPlugin(isBuild: boolean): Plugin | Plugin[] { - const useGzip = isBuild && isBuildGzip(); - - if (useGzip) { - return gzipPlugin(); - } - - return []; -} diff --git a/build/vite/plugin/index.ts b/build/vite/plugin/index.ts index 108c270a..667dd7a2 100644 --- a/build/vite/plugin/index.ts +++ b/build/vite/plugin/index.ts @@ -9,14 +9,14 @@ import { ViteEnv } from '../../utils'; import { configHtmlPlugin } from './html'; import { configPwaConfig } from './pwa'; import { configMockPlugin } from './mock'; -import { configGzipPlugin } from './gzip'; +import { configCompressPlugin } from './compress'; import { configStyleImportPlugin } from './styleImport'; import { configVisualizerConfig } from './visualizer'; import { configThemePlugin } from './theme'; import { configImageminPlugin } from './imagemin'; export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { - const { VITE_USE_IMAGEMIN, VITE_USE_MOCK, VITE_LEGACY } = viteEnv; + const { VITE_USE_IMAGEMIN, VITE_USE_MOCK, VITE_LEGACY, VITE_BUILD_COMPRESS } = viteEnv; const vitePlugins: (Plugin | Plugin[])[] = [ // have to @@ -52,7 +52,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { VITE_USE_IMAGEMIN && vitePlugins.push(configImageminPlugin()); // rollup-plugin-gzip - vitePlugins.push(configGzipPlugin(isBuild)); + vitePlugins.push(configCompressPlugin(VITE_BUILD_COMPRESS)); // vite-plugin-pwa vitePlugins.push(configPwaConfig(viteEnv)); diff --git a/package.json b/package.json index 5d321cb3..a2c5d275 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,8 @@ "lint:stylelint": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", "lint:ls-lint": "ls-lint", "lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js", + "test:gzip": "http-server dist --cors --gzip -c-1", + "test:br": "http-server dist --cors --brotli -c-1", "reinstall": "rimraf yarn.lock && rimraf package.lock.json && rimraf node_modules && npm run bootstrap", "postinstall": "is-ci || husky install" }, @@ -53,7 +55,7 @@ "@ls-lint/ls-lint": "^1.9.2", "@purge-icons/generated": "^0.6.0", "@types/echarts": "^4.9.3", - "@types/fs-extra": "^9.0.6", + "@types/fs-extra": "^9.0.7", "@types/http-proxy": "^1.17.5", "@types/koa-static": "^4.0.1", "@types/lodash-es": "^4.17.4", @@ -66,9 +68,9 @@ "@types/zxcvbn": "^4.4.0", "@typescript-eslint/eslint-plugin": "^4.15.0", "@typescript-eslint/parser": "^4.15.0", - "@vitejs/plugin-legacy": "^1.2.3", + "@vitejs/plugin-legacy": "^1.3.0", "@vitejs/plugin-vue": "^1.1.4", - "@vitejs/plugin-vue-jsx": "^1.0.3", + "@vitejs/plugin-vue-jsx": "^1.1.0", "@vue/compiler-sfc": "^3.0.5", "@vuedx/typecheck": "^0.6.3", "@vuedx/typescript-plugin-vue": "^0.6.3", @@ -83,28 +85,29 @@ "eslint-plugin-vue": "^7.5.0", "esno": "^0.4.3", "fs-extra": "^9.1.0", + "http-server": "^0.12.3", "husky": "^5.0.9", "is-ci": "^2.0.0", "less": "^4.1.1", "lint-staged": "^10.5.4", "prettier": "^2.2.1", "rimraf": "^3.0.2", - "rollup-plugin-gzip": "^2.5.0", "rollup-plugin-visualizer": "^4.2.0", - "stylelint": "^13.9.0", + "stylelint": "^13.10.0", "stylelint-config-prettier": "^8.0.2", "stylelint-config-standard": "^20.0.0", "stylelint-order": "^4.1.0", "ts-node": "^9.1.1", - "typescript": "^4.1.3", - "vite": "2.0.0-beta.66", + "typescript": "^4.1.5", + "vite": "2.0.0-beta.69", + "vite-plugin-compression": "^0.2.1", "vite-plugin-html": "^2.0.0", - "vite-plugin-imagemin": "^0.2.5", + "vite-plugin-imagemin": "^0.2.6", "vite-plugin-mock": "^2.1.4", "vite-plugin-purge-icons": "^0.6.0", "vite-plugin-pwa": "^0.4.6", "vite-plugin-style-import": "^0.7.2", - "vite-plugin-theme": "^0.4.2", + "vite-plugin-theme": "^0.4.3", "vue-eslint-parser": "^7.4.1", "yargs": "^16.2.0" }, diff --git a/vite.config.ts b/vite.config.ts index b344f6fd..543465b8 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -30,13 +30,15 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { return { base: VITE_PUBLIC_PATH, root, - alias: [ - { - // /@/xxxx => src/xxx - find: /^\/@\//, - replacement: pathResolve('src') + '/', - }, - ], + resolve: { + alias: [ + { + // /@/xxxx => src/xxx + find: /^\/@\//, + replacement: pathResolve('src') + '/', + }, + ], + }, server: { port: VITE_PORT, // Load proxy configuration from .env @@ -88,6 +90,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { optimizeDeps: { // @iconify/iconify: The dependency is dynamically and virtually loaded by @purge-icons/generated, so it needs to be specified explicitly include: ['@iconify/iconify'], + exclude: ['vue-demi'], }, }; }; diff --git a/yarn.lock b/yarn.lock index 7a1f3606..5fd5fb94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1478,10 +1478,10 @@ "@types/qs" "*" "@types/serve-static" "*" -"@types/fs-extra@^9.0.6": - version "9.0.6" - resolved "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.6.tgz#488e56b77299899a608b8269719c1d133027a6ab" - integrity sha512-ecNRHw4clCkowNOBJH1e77nvbPxHYnWIXMv1IAoG/9+MYGkgoyr3Ppxr7XYFNL41V422EDhyV4/4SSK8L2mlig== +"@types/fs-extra@^9.0.7": + version "9.0.7" + resolved "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.7.tgz#a9ef2ffdab043def080c5bec94c03402f793577f" + integrity sha512-YGq2A6Yc3bldrLUlm17VNWOnUbnEzJ9CMgOeLFtQF3HOCN5lQBO8VyjG00a5acA5NNSM30kHVGp1trZgnVgi1Q== dependencies: "@types/node" "*" @@ -1829,20 +1829,21 @@ "@typescript-eslint/types" "4.15.0" eslint-visitor-keys "^2.0.0" -"@vitejs/plugin-legacy@^1.2.3": - version "1.2.3" - resolved "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-1.2.3.tgz#1007033b0a328e5c0d8d21683383dc40d8fed6a3" - integrity sha512-DOceNUiGkN/Iv3dFJGDwJMdIFv4N+5vDt96MdBFOFMlktt1fumOuNJvyCBE8TKc0qC0K5YSxUXpfKeKZhkkyLQ== +"@vitejs/plugin-legacy@^1.3.0": + version "1.3.0" + resolved "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-1.3.0.tgz#1b4f5d46e0cc3eb7d415f7aa9a9b655c2f593325" + integrity sha512-lNNNuFIZ3bTnAPlu/dvqi383+mpqVuoo0XpM4WtgxMQHNxK1rTk2liwlxxQk0/ivUJuvYo67YKq0GD1JkrQk5Q== dependencies: "@babel/standalone" "^7.12.12" core-js "^3.8.2" + magic-string "^0.25.7" regenerator-runtime "^0.13.7" systemjs "^6.8.3" -"@vitejs/plugin-vue-jsx@^1.0.3": - version "1.0.3" - resolved "https://registry.npmjs.org/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-1.0.3.tgz#3f59884ce47886cd6e6cd794877e3e9e0df98cb4" - integrity sha512-ZidQqRkb3BoH0xhYZ8gO+F+DVYEirg+MafzOJ1WUXXGn5peRIiy+k22KsuyC3bguL37SN6rx5ypjeef1r/qqOw== +"@vitejs/plugin-vue-jsx@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-1.1.0.tgz#9bd45834db9e8d29a569e330917142c073dab347" + integrity sha512-7fpB9rdhWZ7DSdcK/w2sEuSaeOiSyhwu/2ojwl8qz1pshWEPQj9F2g9TaZtEBz298nOKBM0hUOCcKKRUO8Ga8A== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-syntax-import-meta" "^7.10.4" @@ -2341,6 +2342,13 @@ async@0.9.x: resolved "https://registry.npmjs.org/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" integrity sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0= +async@^2.6.2: + version "2.6.3" + resolved "https://registry.npmjs.org/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + at-least-node@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" @@ -2418,6 +2426,11 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" +basic-auth@^1.0.3: + version "1.1.0" + resolved "https://registry.npmjs.org/basic-auth/-/basic-auth-1.1.0.tgz#45221ee429f7ee1e5035be3f51533f1cdfd29884" + integrity sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ= + big.js@^5.2.2: version "5.2.2" resolved "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -2970,6 +2983,11 @@ colorette@^1.2.1: resolved "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== +colors@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + commander@*: version "7.0.0" resolved "https://registry.npmjs.org/commander/-/commander-7.0.0.tgz#3e2bbfd8bb6724760980988fb5b22b7ee6b71ab2" @@ -3304,6 +3322,11 @@ core-util-is@~1.0.0: resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +corser@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz#8eda252ecaab5840dcd975ceb90d9370c819ff87" + integrity sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c= + cosmiconfig@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" @@ -3498,7 +3521,7 @@ debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, d dependencies: ms "2.1.2" -debug@^3.2.6: +debug@^3.1.1, debug@^3.2.6: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -3788,6 +3811,16 @@ echarts@^4.9.0: dependencies: zrender "4.3.2" +ecstatic@^3.3.2: + version "3.3.2" + resolved "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz#6d1dd49814d00594682c652adb66076a69d46c48" + integrity sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog== + dependencies: + he "^1.1.1" + mime "^1.6.0" + minimist "^1.1.0" + url-join "^2.0.5" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -4119,6 +4152,11 @@ esutils@^2.0.2: resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + exec-buffer@^3.0.0: version "3.2.0" resolved "https://registry.npmjs.org/exec-buffer/-/exec-buffer-3.2.0.tgz#b1686dbd904c7cf982e652c1f5a79b1e5573082b" @@ -4520,6 +4558,11 @@ flatted@^3.1.0: resolved "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== +follow-redirects@^1.0.0: + version "1.13.2" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147" + integrity sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA== + follow-redirects@^1.10.0: version "1.13.1" resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz#5f69b813376cee4fd0474a3aba835df04ab763b7" @@ -5010,7 +5053,7 @@ hash-sum@^2.0.0: resolved "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz#81d01bb5de8ea4a214ad5d6ead1b523460b0b45a" integrity sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg== -he@^1.2.0: +he@^1.1.1, he@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -5098,6 +5141,31 @@ http-errors@1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" +http-proxy@^1.18.0: + version "1.18.1" + resolved "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +http-server@^0.12.3: + version "0.12.3" + resolved "https://registry.npmjs.org/http-server/-/http-server-0.12.3.tgz#ba0471d0ecc425886616cb35c4faf279140a0d37" + integrity sha512-be0dKG6pni92bRjq0kvExtj/NrrAd28/8fCXkaI/4piTwQMSDSLMhWyW0NI1V+DBI3aa1HMlQu46/HjVLfmugA== + dependencies: + basic-auth "^1.0.3" + colors "^1.4.0" + corser "^2.0.1" + ecstatic "^3.3.2" + http-proxy "^1.18.0" + minimist "^1.2.5" + opener "^1.5.1" + portfinder "^1.0.25" + secure-compare "3.0.1" + union "~0.5.0" + https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -5834,10 +5902,10 @@ kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== -known-css-properties@^0.20.0: - version "0.20.0" - resolved "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.20.0.tgz#0570831661b47dd835293218381166090ff60e96" - integrity sha512-URvsjaA9ypfreqJ2/ylDr5MUERhJZ+DhguoWRr2xgS5C7aGCalXo+ewL+GixgKBfhT2vuL02nbIgNGqVWgTOYw== +known-css-properties@^0.21.0: + version "0.21.0" + resolved "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.21.0.tgz#15fbd0bbb83447f3ce09d8af247ed47c68ede80d" + integrity sha512-sZLUnTqimCkvkgRS+kbPlYW5o8q5w1cu+uIisKpEWkj31I8mx8kNG162DwRav8Zirkva6N5uoFsm9kzK4mUXjw== less@^4.1.1: version "4.1.1" @@ -6348,7 +6416,7 @@ mime-types@~2.1.24: dependencies: mime-db "1.45.0" -mime@^1.4.1: +mime@^1.4.1, mime@^1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== @@ -6389,7 +6457,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@1.2.5, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: +minimist@1.2.5, minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -6402,7 +6470,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@~0.5.1: +mkdirp@^0.5.5, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -6736,6 +6804,11 @@ open@^7.0.3: is-docker "^2.0.0" is-wsl "^2.1.1" +opener@^1.5.1: + version "1.5.2" + resolved "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" + integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== + optionator@^0.9.1: version "0.9.1" resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" @@ -7146,6 +7219,15 @@ pngquant-bin@^6.0.0: execa "^4.0.0" logalot "^2.0.0" +portfinder@^1.0.25: + version "1.0.28" + resolved "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" + integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA== + dependencies: + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.5" + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -7389,6 +7471,11 @@ qs@6.7.0: resolved "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== +qs@^6.4.0: + version "6.9.6" + resolved "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee" + integrity sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ== + query-string@^5.0.1: version "5.1.1" resolved "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" @@ -7656,6 +7743,11 @@ require-main-filename@^2.0.0: resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= + resize-observer-polyfill@^1.5.1: version "1.5.1" resolved "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" @@ -7755,11 +7847,6 @@ rollup-plugin-esbuild@^2.6.1: joycon "^2.2.5" strip-json-comments "^3.1.1" -rollup-plugin-gzip@^2.5.0: - version "2.5.0" - resolved "https://registry.npmjs.org/rollup-plugin-gzip/-/rollup-plugin-gzip-2.5.0.tgz#786650e7bddf86d7f723c205c3e3018ea727388c" - integrity sha512-1N0xtJJ8XfZYklZN1QcMLe+Mos2Vaccy3YUarE/AB1RkH7mkeppkFAz9srh+9KWOC3I2LWJeAYwFabO0rJ4mxg== - rollup-plugin-purge-icons@^0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/rollup-plugin-purge-icons/-/rollup-plugin-purge-icons-0.6.0.tgz#cfddf4935107180bdb14385228449c0d8b0557a2" @@ -7861,6 +7948,11 @@ scroll-into-view-if-needed@^2.2.25: dependencies: compute-scroll-into-view "^1.0.16" +secure-compare@3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz#f1a0329b308b221fae37b9974f3d578d0ca999e3" + integrity sha1-8aAymzCLIh+uN7mXTz1XjQypmeM= + seek-bzip@^1.0.5: version "1.0.6" resolved "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz#35c4171f55a680916b52a07859ecf3b5857f21c4" @@ -8436,10 +8528,10 @@ stylelint-order@^4.1.0: postcss "^7.0.31" postcss-sorting "^5.0.1" -stylelint@^13.9.0: - version "13.9.0" - resolved "https://registry.npmjs.org/stylelint/-/stylelint-13.9.0.tgz#93921ee6e11d4556b9f31131f485dc813b68e32a" - integrity sha512-VVWH2oixOAxpWL1vH+V42ReCzBjW2AeqskSAbi8+3OjV1Xg3VZkmTcAqBZfRRvJeF4BvYuDLXebW3tIHxgZDEg== +stylelint@^13.10.0: + version "13.10.0" + resolved "https://registry.npmjs.org/stylelint/-/stylelint-13.10.0.tgz#67b0c6f378c3fa61aa569a55d38feb8570b0b587" + integrity sha512-eDuLrL0wzPKbl5/TbNGZcbw0lTIGbDEr5W6lCODvb1gAg0ncbgCRt7oU0C2VFDvbrcY0A3MFZOwltwTRmc0XCw== dependencies: "@stylelint/postcss-css-in-js" "^0.37.2" "@stylelint/postcss-markdown" "^0.36.2" @@ -8460,7 +8552,7 @@ stylelint@^13.9.0: ignore "^5.1.8" import-lazy "^4.0.0" imurmurhash "^0.1.4" - known-css-properties "^0.20.0" + known-css-properties "^0.21.0" lodash "^4.17.20" log-symbols "^4.0.0" mathml-tag-names "^2.1.3" @@ -8909,11 +9001,16 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^4.0.3, typescript@^4.1.3: +typescript@^4.0.3: version "4.1.3" resolved "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== +typescript@^4.1.5: + version "4.1.5" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72" + integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA== + uglify-js@^3.1.4: version "3.12.5" resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.5.tgz#83241496087c640efe9dfc934832e71725aba008" @@ -8972,6 +9069,13 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" +union@~0.5.0: + version "0.5.0" + resolved "https://registry.npmjs.org/union/-/union-0.5.0.tgz#b2c11be84f60538537b846edb9ba266ba0090075" + integrity sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA== + dependencies: + qs "^6.4.0" + uniq@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" @@ -9062,6 +9166,11 @@ urix@^0.1.0: resolved "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= +url-join@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz#5af22f18c052a000a48d7b82c5e9c2e2feeda728" + integrity sha1-WvIvGMBSoACkjXuCxenC4v7tpyg= + url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" @@ -9154,6 +9263,15 @@ vfile@^4.0.0: unist-util-stringify-position "^2.0.0" vfile-message "^2.0.0" +vite-plugin-compression@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/vite-plugin-compression/-/vite-plugin-compression-0.2.1.tgz#9519f2838c9945fa5f64dda2e9a7c354e86a6d43" + integrity sha512-wZilE9pm1qV3PNVzMxCrJkhmnpwtXrf8kC1NekNcvP5lxFbGMwhj0fqedds1ujFSBHripknQaPwLsSXRtFen/Q== + dependencies: + chalk "^4.1.0" + debug "^4.3.2" + fs-extra "^9.1.0" + vite-plugin-html@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/vite-plugin-html/-/vite-plugin-html-2.0.0.tgz#de39b99ce7df4d0e1234bfae5c23215647d71a28" @@ -9163,10 +9281,10 @@ vite-plugin-html@^2.0.0: fs-extra "^9.1.0" html-minifier-terser "^5.1.1" -vite-plugin-imagemin@^0.2.5: - version "0.2.5" - resolved "https://registry.npmjs.org/vite-plugin-imagemin/-/vite-plugin-imagemin-0.2.5.tgz#926b57f570f55d29081ebbea5c073298e411ef42" - integrity sha512-wweK2QLJTNIkqEoCXuKJJP1Y+Duu2tA0CKtST6ovzXra4kMx6BQ3nWCRkr66Ye6fQii5yPSuE1ZtTNVLSi9mmw== +vite-plugin-imagemin@^0.2.6: + version "0.2.6" + resolved "https://registry.npmjs.org/vite-plugin-imagemin/-/vite-plugin-imagemin-0.2.6.tgz#e8c3f2e4dcd9c8017d5624b52868bbfa60374d0b" + integrity sha512-fnMFMQjQGYdvIEkISkVawFiyttgfjcAzBbDDVR2ThSnV4NHhCh8Y3WuduyH1kpEJLdJ4H83vP+94CkJZy7RP9Q== dependencies: "@types/imagemin" "^7.0.0" "@types/imagemin-gifsicle" "^7.0.0" @@ -9234,22 +9352,22 @@ vite-plugin-style-import@^0.7.2: es-module-lexer "^0.3.26" magic-string "^0.25.7" -vite-plugin-theme@^0.4.2: - version "0.4.2" - resolved "https://registry.npmjs.org/vite-plugin-theme/-/vite-plugin-theme-0.4.2.tgz#bb4791ddd88205f2fd07ae9aff7a92d5d427b516" - integrity sha512-NOk56zCYloaVmqWh8o+OShJLVTNVsDZRLEeToHsv0yGXd94gCiYTflguGtcmsSQjQfQYOz/gGKjLAU4KPH/FKA== +vite-plugin-theme@^0.4.3: + version "0.4.3" + resolved "https://registry.npmjs.org/vite-plugin-theme/-/vite-plugin-theme-0.4.3.tgz#d1d92a7d0d63aa0af4703e50ae2cdc0285295bd2" + integrity sha512-5qychnrG+iN6+YJmGJT853IT2elr5TIF6I9GkRStVs5GWemR3f/OllLN/AjO1j8vnTG58mttYpyD8N5zGQ/P8w== dependencies: "@types/tinycolor2" "^1.4.2" chalk "^4.1.0" clean-css "^4.2.3" - debug "^4.3.1" + debug "^4.3.2" es-module-lexer "^0.3.26" tinycolor2 "^1.4.2" -vite@2.0.0-beta.66: - version "2.0.0-beta.66" - resolved "https://registry.npmjs.org/vite/-/vite-2.0.0-beta.66.tgz#f9fbb3490bb235efd73366d8d0974f3e7a3e3d54" - integrity sha512-tUn708PIWHCrj83t09OAiJ2YU5EJGz5VOSivKTPq+s5I48rN4B2B3ZTRpg4n8WMw2ZQLWnrQOXWfqXoMBEJd9g== +vite@2.0.0-beta.69: + version "2.0.0-beta.69" + resolved "https://registry.npmjs.org/vite/-/vite-2.0.0-beta.69.tgz#dd10b4c366d64e670a0da612097fe9645c40212b" + integrity sha512-Wf4bWOK/b6Q+06Wyk7uJIBy/LiENGx26do6tn9gOMRRZLEuLizN/cDzGqnQkGVVevbb18xdilyxhnTes0lFjZg== dependencies: esbuild "^0.8.34" postcss "^8.2.1" -- GitLab