perf(theme): optimize deps include swiper

This commit is contained in:
pengzhanbo 2024-09-13 19:09:03 +08:00
parent 7dc63192c8
commit fcb2ca4507

View File

@ -25,7 +25,7 @@ export function extendsBundlerOptions(bundlerOptions: any, app: App): void {
])
if (isPackageExists('swiper')) {
addViteOptimizeDepsInclude(bundlerOptions, app, 'swiper', true)
addViteOptimizeDepsInclude(bundlerOptions, app, ['swiper/modules', 'swiper/vue'], true)
addViteSsrNoExternal(bundlerOptions, app, ['swiper'])
}