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:
parent
d3029fe9f4
commit
963962e8ac
1 changed files with 10 additions and 4 deletions
|
@ -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_',
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue