Split build into smaller chunks
This commit is contained in:
parent
85822bd375
commit
2498b10008
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"cSpell.words": [
|
||||
"kbar",
|
||||
"vite",
|
||||
"vitejs"
|
||||
]
|
||||
|
|
|
@ -4,8 +4,31 @@ import { visualizer } from 'rollup-plugin-visualizer';
|
|||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
// This changes the out put dir from dist to build
|
||||
build: { outDir: 'build' },
|
||||
build: {
|
||||
outDir: 'build', // This changes the out put dir from dist to build
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
firebase: [
|
||||
'firebase/app',
|
||||
'firebase/performance',
|
||||
'firebase/auth',
|
||||
'firebase/analytics',
|
||||
'firebase/storage',
|
||||
'firebase/firestore/lite',
|
||||
],
|
||||
react: ['react', 'react-dom'],
|
||||
antdResult: ['antd/es/result'],
|
||||
antdTable: ['antd/es/table'],
|
||||
antdIcons: ['@ant-design/icons'],
|
||||
uplot: ['uplot'],
|
||||
sentry: ['@sentry/react', '@sentry/browser', '@sentry/tracing'],
|
||||
kbar: ['kbar'],
|
||||
perfectScrollbar: ['perfect-scrollbar'],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
server: { open: true },
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
|
|
Loading…
Reference in New Issue