Vite Chunck karmaşası
This commit is contained in:
parent
17de8148ae
commit
f2560c5cf2
1 changed files with 0 additions and 23 deletions
|
|
@ -77,29 +77,6 @@ export default defineConfig(async ({ mode }) => {
|
|||
build: {
|
||||
outDir: 'dist',
|
||||
sourcemap: false,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (id.includes('node_modules')) {
|
||||
if (id.match(/node_modules[\\/]react/)) return 'vendor-react'
|
||||
if (id.match(/node_modules[\\/]react-dom/)) return 'vendor-reactdom'
|
||||
if (id.match(/node_modules[\\/]devextreme/)) return 'vendor-devextreme'
|
||||
if (id.match(/node_modules[\\/]@devexpress/)) return 'vendor-devexpress'
|
||||
if (id.match(/node_modules[\\/]devextreme-react/)) return 'vendor-devextreme-react'
|
||||
if (id.match(/node_modules[\\/]axios/)) return 'vendor-axios'
|
||||
if (id.match(/node_modules[\\/]formik/)) return 'vendor-formik'
|
||||
if (id.match(/node_modules[\\/]jspdf/)) return 'vendor-jspdf'
|
||||
if (id.match(/node_modules[\\/]exceljs/)) return 'vendor-exceljs'
|
||||
if (id.match(/node_modules[\\/]html2canvas/)) return 'vendor-html2canvas'
|
||||
if (id.match(/node_modules[\\/]@?react-router/)) return 'vendor-reactrouter'
|
||||
// Büyük modüller için özel chunk
|
||||
if (id.match(/src[\\/]codeParser/)) return 'chunk-codeParser'
|
||||
if (id.match(/src[\\/]views[\\/]list[\\/]Utils/)) return 'chunk-list-utils'
|
||||
return 'vendor'
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
preview: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue