ci: fix build chunks + blocks import

pull/7004/head
NGPixel 1 year ago
parent f0bb48c9c8
commit de14e7c4de
No known key found for this signature in database
GPG Key ID: B755FB6870B30F63

@ -95,12 +95,24 @@ module.exports = configure(function (ctx) {
viteConf.build.rollupOptions = { viteConf.build.rollupOptions = {
...viteConf.build.rollupOptions ?? {}, ...viteConf.build.rollupOptions ?? {},
output: { output: {
manualChunks: { manualChunks (id) {
lodash: ['lodash-es', 'lodash'], if (id.includes('lodash')) {
quasar: ['quasar', 'quasar/src/components'] return 'lodash'
} else if (id.includes('quasar')) {
return 'quasar'
} else if (id.includes('pages/Admin')) {
return 'admin'
} else if (id.includes('pages/Profile')) {
return 'profile'
}
} }
} }
} }
viteConf.build.chunkSizeWarningLimit = 5000
viteConf.build.dynamicImportVarsOptions = {
warnOnError: true,
include: ['!/_blocks/**']
}
viteConf.optimizeDeps.include = [ viteConf.optimizeDeps.include = [
'prosemirror-state', 'prosemirror-state',
'prosemirror-transform', 'prosemirror-transform',

Loading…
Cancel
Save