From feea43639af164d923b6549206c4e424261c2646 Mon Sep 17 00:00:00 2001 From: kcwww Date: Sun, 21 Apr 2024 00:49:23 +0900 Subject: [PATCH] feat: add gzip compress --- front/vite.config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/front/vite.config.ts b/front/vite.config.ts index 5034c8b..7c4a641 100644 --- a/front/vite.config.ts +++ b/front/vite.config.ts @@ -1,10 +1,15 @@ import react from '@vitejs/plugin-react-swc'; import { defineConfig } from 'vite'; //import mkcert from 'vite-plugin-mkcert'; +import { compression } from 'vite-plugin-compression2'; export default defineConfig({ plugins: [react(), // mkcert(), + compression({ + include : /\.(js|css|html|svg|json|ico|eot|otf|ttf|woff|woff2|mp3)$/i, + threshold: 1400, + }) ], server: { host: '0.0.0.0',