1
0
mirror of https://github.com/kihashi/stardew_community_checklist.git synced 2025-10-19 08:03:17 +00:00
stardew_community_checklist/vite.config.ts
lachie-underhill 5912def418
Reduce bundle size w/ lazy imports and correct icon usage
Largest bundle decreased from 2,901kB -> 118kB
2023-06-05 17:03:26 +10:00

29 lines
673 B
TypeScript

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue({ script: { defineModel: true } }), vueJsx()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
build: {
rollupOptions: {
output: {
manualChunks: {
bundles: [
'./src/views/BundlesView.vue',
'./src/components/bundles/BundleItems.vue',
'./src/components/bundles/BundleNav.vue'
]
}
}
}
}
})