Skip to content

Commit 0785ad8

Browse files
authored
build: Vendor Split Popular Packages (#3499)
1 parent 34d176a commit 0785ad8

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

vite.config.mjs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,31 @@ export default defineConfig((config) => {
6868
entryFileNames: 'assets/[name].[hash:22].js',
6969
chunkFileNames: 'assets/[name].[hash:22].js',
7070
assetFileNames: 'assets/[name].[hash:22][extname]',
71+
manualChunks: {
72+
vendor_react: ['react', 'react-dom', 'react/jsx-runtime'],
73+
vendor_react_router: [
74+
'react-router',
75+
'react-router-dom',
76+
'react-router-dom-v5-compat',
77+
],
78+
vendor_date_fns: ['date-fns'],
79+
vendor_lodash: [
80+
'lodash/get',
81+
'lodash/isEqual',
82+
'lodash/isNull',
83+
'lodash/isNil',
84+
'lodash/isEmpty',
85+
'lodash/isString',
86+
'lodash/isNumber',
87+
'lodash/isBoolean',
88+
'lodash/isUndefined',
89+
'lodash/isArray',
90+
'lodash/gt',
91+
'lodash/omit',
92+
'lodash/flatMap',
93+
'lodash/groupBy',
94+
],
95+
},
7196
},
7297
},
7398
},

0 commit comments

Comments
 (0)