mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 13:48:13 +00:00
fix(vite): dedupe/optimize more vue core deps (#20829)
This commit is contained in:
parent
7006064567
commit
ebbda2cbe4
@ -48,7 +48,14 @@ export async function buildClient (ctx: ViteBuildContext) {
|
||||
'#build/plugins': resolve(ctx.nuxt.options.buildDir, 'plugins/client'),
|
||||
'#internal/nitro': resolve(ctx.nuxt.options.buildDir, 'nitro.client.mjs')
|
||||
},
|
||||
dedupe: ['vue']
|
||||
dedupe: [
|
||||
'vue',
|
||||
// basic reactivity
|
||||
'@vue/reactivity', '@vue/runtime-core', '@vue/runtime-dom', '@vue/shared',
|
||||
// runtime compiler
|
||||
'@vue/compiler-sfc', '@vue/compiler-dom', '@vue/compiler-core', '@vue/compiler-ssr'
|
||||
]
|
||||
|
||||
},
|
||||
cacheDir: resolve(ctx.nuxt.options.rootDir, 'node_modules/.cache/vite', 'client'),
|
||||
build: {
|
||||
|
@ -67,7 +67,7 @@ export async function bundle (nuxt: Nuxt) {
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['vue'],
|
||||
include: ['vue', '@vue/reactivity', '@vue/runtime-core', '@vue/runtime-dom', '@vue/shared'],
|
||||
exclude: ['nuxt/app']
|
||||
},
|
||||
css: resolveCSSOptions(nuxt),
|
||||
|
Loading…
Reference in New Issue
Block a user