chore: add vite-compression

This commit is contained in:
Andre Henriques 2025-04-02 14:23:09 +01:00
parent f530199b38
commit 12b1cf71ad
3 changed files with 45 additions and 1 deletions

View File

@ -30,6 +30,7 @@
"typescript": "~5.6.2",
"typescript-eslint": "^8.18.2",
"vite": "^6.0.5",
"vite-plugin-compression": "^0.5.1",
"vitest": "^2.1.8"
}
}

View File

@ -60,6 +60,9 @@ importers:
vite:
specifier: ^6.0.5
version: 6.2.4(jiti@2.4.2)(lightningcss@1.29.2)
vite-plugin-compression:
specifier: ^0.5.1
version: 0.5.1(vite@6.2.4(jiti@2.4.2)(lightningcss@1.29.2))
vitest:
specifier: ^2.1.8
version: 2.1.9(lightningcss@1.29.2)
@ -1164,6 +1167,10 @@ packages:
resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==}
engines: {node: '>= 0.4'}
fs-extra@10.1.0:
resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==}
engines: {node: '>=12'}
fsevents@2.3.3:
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@ -1408,6 +1415,9 @@ packages:
engines: {node: '>=6'}
hasBin: true
jsonfile@6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
jsx-ast-utils@3.3.5:
resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==}
engines: {node: '>=4.0'}
@ -1850,6 +1860,10 @@ packages:
resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==}
engines: {node: '>= 0.4'}
universalify@2.0.1:
resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}
engines: {node: '>= 10.0.0'}
update-browserslist-db@1.1.3:
resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==}
hasBin: true
@ -1864,6 +1878,11 @@ packages:
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
vite-plugin-compression@0.5.1:
resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==}
peerDependencies:
vite: '>=2.0.0'
vite@5.4.16:
resolution: {integrity: sha512-Y5gnfp4NemVfgOTDQAunSD4346fal44L9mszGGY/e+qxsRT5y1sMlS/8tiQ8AFAp+MFgYNSINdfEchJiPm41vQ==}
engines: {node: ^18.0.0 || >=20.0.0}
@ -3173,6 +3192,12 @@ snapshots:
dependencies:
is-callable: 1.2.7
fs-extra@10.1.0:
dependencies:
graceful-fs: 4.2.11
jsonfile: 6.1.0
universalify: 2.0.1
fsevents@2.3.3:
optional: true
@ -3413,6 +3438,12 @@ snapshots:
json5@2.2.3: {}
jsonfile@6.1.0:
dependencies:
universalify: 2.0.1
optionalDependencies:
graceful-fs: 4.2.11
jsx-ast-utils@3.3.5:
dependencies:
array-includes: 3.1.8
@ -3911,6 +3942,8 @@ snapshots:
has-symbols: 1.1.0
which-boxed-primitive: 1.1.1
universalify@2.0.1: {}
update-browserslist-db@1.1.3(browserslist@4.24.4):
dependencies:
browserslist: 4.24.4
@ -3939,6 +3972,15 @@ snapshots:
- supports-color
- terser
vite-plugin-compression@0.5.1(vite@6.2.4(jiti@2.4.2)(lightningcss@1.29.2)):
dependencies:
chalk: 4.1.2
debug: 4.4.0
fs-extra: 10.1.0
vite: 6.2.4(jiti@2.4.2)(lightningcss@1.29.2)
transitivePeerDependencies:
- supports-color
vite@5.4.16(lightningcss@1.29.2):
dependencies:
esbuild: 0.21.5

View File

@ -1,8 +1,9 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwind from '@tailwindcss/vite';
import viteCompression from "vite-plugin-compression";
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwind()],
plugins: [react(), tailwind(), viteCompression()],
})