Files
git-velocity/web/vite.config.js
T
lukaszraczylo 82e987f41c fix(web): split chart chunk with rolldown codeSplitting
Vite 8 uses Rolldown, which rejects the object form of manualChunks.
Move the chart.js chunk to build.rolldownOptions.output.codeSplitting.
2026-10-04 11:40:17 +01:00

31 lines
571 B
JavaScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
export default defineConfig({
plugins: [vue()],
base: './',
resolve: {
alias: {
'@': resolve(__dirname, 'src')
}
},
build: {
outDir: 'dist',
assetsDir: 'assets',
emptyOutDir: true,
rolldownOptions: {
output: {
codeSplitting: {
groups: [
{
name: 'chart',
test: /node_modules\/(chart\.js|@kurkle\/color)\//
}
]
}
}
}
}
})