fix(nuxt): dedupe vue-router (#18626)

This commit is contained in:
Daniel Roe 2023-01-30 10:22:15 -08:00 committed by GitHub
parent 5037dd6876
commit a0085b70a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,6 +186,10 @@ export default defineNuxtModule({
nuxt.options.vite.optimizeDeps.include = nuxt.options.vite.optimizeDeps.include || []
nuxt.options.vite.optimizeDeps.include.push('vue-router')
nuxt.options.vite.resolve = nuxt.options.vite.resolve || {}
nuxt.options.vite.resolve.dedupe = nuxt.options.vite.resolve.dedupe || []
nuxt.options.vite.resolve.dedupe.push('vue-router')
// Add router options template
addTemplate({
filename: 'router.options.mjs',