⚡ 修改打包配置.
This commit is contained in:
@@ -44,7 +44,7 @@ const enabled = (): Partial<VitePWAOptions> => {
|
||||
},
|
||||
registerType: 'autoUpdate',
|
||||
workbox: {
|
||||
// 缓存相关静态资源
|
||||
// 缓存资源
|
||||
globPatterns: ['**/*.{js,css,html,ico,png,jpg,svg}'],
|
||||
// 配置自定义运行时缓存
|
||||
runtimeCaching: [
|
||||
@@ -122,7 +122,9 @@ const enabled = (): Partial<VitePWAOptions> => {
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
// 缓存大小
|
||||
maximumFileSizeToCacheInBytes: 8 * 1024 * 1024,
|
||||
},
|
||||
devOptions: {
|
||||
enabled: true,
|
||||
|
||||
@@ -19,12 +19,19 @@ export default mergeConfig(
|
||||
output: {
|
||||
manualChunks: {
|
||||
arco: ['@arco-design/web-vue'],
|
||||
arcoExt: ['@sanqi377/arco-vue-icon-picker', '@dangojs/a-query-header'],
|
||||
chart: ['echarts', 'vue-echarts'],
|
||||
vue: ['vue', 'vue-router', 'pinia', '@vueuse/core', 'vue-i18n'],
|
||||
axios: ['axios'],
|
||||
xterm: ['@xterm/xterm', '@xterm/addon-canvas', '@xterm/addon-fit',
|
||||
'@xterm/addon-image', '@xterm/addon-search', '@xterm/addon-unicode11',
|
||||
'@xterm/addon-web-links', '@xterm/addon-webgl'],
|
||||
monaco: ['monaco-editor'],
|
||||
pkg: ['dayjs', 'cron-parser', 'ts-md5', 'file-saver', 'html2canvas']
|
||||
},
|
||||
},
|
||||
},
|
||||
chunkSizeWarningLimit: 2000,
|
||||
chunkSizeWarningLimit: 1024 * 8,
|
||||
},
|
||||
},
|
||||
baseConfig,
|
||||
|
||||
Reference in New Issue
Block a user