From 588548a28a11ec3ef744a50e417241e973115a93 Mon Sep 17 00:00:00 2001 From: eshanized Date: Fri, 27 Dec 2024 21:56:28 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20perf(=5Frollup):=20rename?= =?UTF-8?q?=20the=20index,=20style=20nd=20js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index e1052f8..aacdb00 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,8 +4,24 @@ import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], - base: '/package-browser/', + base: '/package-browser/', // For GitHub Pages deployment + + build: { + rollupOptions: { + output: { + // Entry file for JavaScript + entryFileNames: 'main.js', // Ensure JS is named main.js + // Chunk file names if you want to bundle them together (optional) + chunkFileNames: 'main.js', // All chunks will go into main.js (optional, use with caution) + // Asset file names (CSS) + assetFileNames: 'style.css', // Ensure CSS is named style.css + }, + }, + // To split CSS into its own file + cssCodeSplit: true, + }, + optimizeDeps: { - exclude: ['lucide-react'], + exclude: ['lucide-react'], // Exclude lucide-react from pre-bundling }, });