From af1312dbd1a7069c40ed0a4d2da5ab60d6957048 Mon Sep 17 00:00:00 2001 From: Haziq Khairi Date: Sun, 7 Jan 2024 22:18:05 +0800 Subject: [PATCH] chore: add dependency, configure vite.config.js and .gitignore --- .gitignore | 2 -- package.json | 3 ++- pnpm-lock.yaml | 33 +++++++++++++++++++++++++++++++++ vite.config.js | 2 ++ 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a547bf3..234f2f1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,6 @@ pnpm-debug.log* lerna-debug.log* node_modules -dist -dist-ssr *.local # Editor directories and files diff --git a/package.json b/package.json index db27042..e6807cb 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,8 @@ "postcss": "^8.4.33", "prettier": "3.1.1", "tailwindcss": "^3.4.1", - "vite": "^5.0.11" + "vite": "^5.0.11", + "vite-plugin-compression2": "^0.11.0" }, "lint-staged": { "**/*.{js,jsx,ts,tsx}": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1969d7d..72aa691 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -82,6 +82,9 @@ devDependencies: vite: specifier: ^5.0.11 version: 5.0.11 + vite-plugin-compression2: + specifier: ^0.11.0 + version: 0.11.0 packages: @@ -2663,6 +2666,20 @@ packages: engines: {node: '>=14.0.0'} dev: false + /@rollup/pluginutils@5.1.0: + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.5 + estree-walker: 2.0.2 + picomatch: 2.3.1 + dev: true + /@rollup/rollup-android-arm-eabi@4.7.0: resolution: {integrity: sha512-rGku10pL1StFlFvXX5pEv88KdGW6DHUghsxyP/aRYb9eH+74jTGJ3U0S/rtlsQ4yYq1Hcc7AMkoJOb1xu29Fxw==} cpu: [arm] @@ -2899,6 +2916,10 @@ packages: resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} dev: true + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + dev: true + /@types/prop-types@15.7.11: resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} @@ -3597,6 +3618,10 @@ packages: engines: {node: '>=4.0'} dev: true + /estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -5322,6 +5347,14 @@ packages: /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + /vite-plugin-compression2@0.11.0: + resolution: {integrity: sha512-U6oEyRXZD26BynOgD/tStNTbQOLPt96aQNj/gdJTicKVYCQCdlV7QdmSF7VEhSyjiS59pQRhiMBu/uajprxWLA==} + dependencies: + '@rollup/pluginutils': 5.1.0 + transitivePeerDependencies: + - rollup + dev: true + /vite@5.0.11: resolution: {integrity: sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==} engines: {node: ^18.0.0 || >=20.0.0} diff --git a/vite.config.js b/vite.config.js index 2691b97..7717d11 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,8 +1,10 @@ import { defineConfig } from 'vite'; +import { compression } from 'vite-plugin-compression2'; import react from '@vitejs/plugin-react-swc'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], base: '/artistry-hub/', + compression, });