From 963962e8ac73f4e6b19940a044bf94884de69543 Mon Sep 17 00:00:00 2001 From: dragongoose Date: Wed, 4 Oct 2023 20:06:55 -0400 Subject: [PATCH] More efficient splitting --- vite.config.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index d264cdc..5ea7d54 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,6 +5,7 @@ import vue from '@vitejs/plugin-vue' import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite' import { dirname, resolve } from 'node:path' import { gitDescribeSync } from 'git-describe' +import { visualizer } from "rollup-plugin-visualizer"; // Footer version const gitVer = gitDescribeSync() @@ -26,10 +27,15 @@ export default defineConfig({ } }, build: { - cssCodeSplit: true - }, - optimizeDeps: { - exclude: ["oh-vue-icons/icons"] + rollupOptions: { + output: { + manualChunks(id) { + if (id.includes('node_modules')) { + return id.toString().split('node_modules/')[1].split('/')[0].toString(); + } + } + } + } }, envPrefix: 'SAFETWITCH_', })