0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch.git synced 2025-01-03 03:10:04 -05:00

More efficient splitting

This commit is contained in:
dragongoose 2023-10-04 20:06:55 -04:00
parent d3029fe9f4
commit 963962e8ac
No known key found for this signature in database
GPG key ID: 01397EEC371CDAA5

View file

@ -5,6 +5,7 @@ import vue from '@vitejs/plugin-vue'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite' import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import { dirname, resolve } from 'node:path' import { dirname, resolve } from 'node:path'
import { gitDescribeSync } from 'git-describe' import { gitDescribeSync } from 'git-describe'
import { visualizer } from "rollup-plugin-visualizer";
// Footer version // Footer version
const gitVer = gitDescribeSync() const gitVer = gitDescribeSync()
@ -26,10 +27,15 @@ export default defineConfig({
} }
}, },
build: { build: {
cssCodeSplit: true rollupOptions: {
}, output: {
optimizeDeps: { manualChunks(id) {
exclude: ["oh-vue-icons/icons"] if (id.includes('node_modules')) {
return id.toString().split('node_modules/')[1].split('/')[0].toString();
}
}
}
}
}, },
envPrefix: 'SAFETWITCH_', envPrefix: 'SAFETWITCH_',
}) })