mirror of
https://github.com/lukaszraczylo/git-velocity.git
synced 2026-10-11 23:20:13 +00:00
Vite 8 uses Rolldown, which rejects the object form of manualChunks. Move the chart.js chunk to build.rolldownOptions.output.codeSplitting.
31 lines
571 B
JavaScript
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)\//
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|