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 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_',
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue