vuepress-theme-plume/theme/src/node/extendsBundlerOptions.ts
2024-06-05 00:34:27 +08:00

19 lines
534 B
TypeScript

import { addViteConfig, addViteOptimizeDepsInclude, addViteSsrNoExternal } from '@vuepress/helper'
import type { App } from 'vuepress'
export function extendsBundlerOptions(bundlerOptions: any, app: App): void {
addViteConfig(bundlerOptions, app, {
build: {
chunkSizeWarningLimit: 1024,
},
})
addViteOptimizeDepsInclude(bundlerOptions, app, '@vueuse/core', true)
addViteSsrNoExternal(bundlerOptions, app, [
'@vuepress/helper',
'@vuepress/plugin-reading-time',
'@vuepress/plugin-watermark',
])
}