Split build into smaller chunks
This commit is contained in:
parent
85822bd375
commit
2498b10008
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
|
"kbar",
|
||||||
"vite",
|
"vite",
|
||||||
"vitejs"
|
"vitejs"
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,8 +4,31 @@ import { visualizer } from 'rollup-plugin-visualizer';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
// This changes the out put dir from dist to build
|
build: {
|
||||||
build: { outDir: '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 },
|
server: { open: true },
|
||||||
css: {
|
css: {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
|
|
Loading…
Reference in New Issue