mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxt): add vue-router
to optimized deps (#8544)
This commit is contained in:
parent
80871e7235
commit
28ffb7fea0
@ -162,6 +162,11 @@ export default defineNuxtModule({
|
||||
getContents: () => 'export { useRoute } from \'vue-router\''
|
||||
})
|
||||
|
||||
// Optimize vue-router to ensure we share the same injection symbol
|
||||
nuxt.options.vite.optimizeDeps = nuxt.options.vite.optimizeDeps || {}
|
||||
nuxt.options.vite.optimizeDeps.include = nuxt.options.vite.optimizeDeps.include || []
|
||||
nuxt.options.vite.optimizeDeps.include.push('vue-router')
|
||||
|
||||
// Add router options template
|
||||
addTemplate({
|
||||
filename: 'router.options.mjs',
|
||||
|
Loading…
Reference in New Issue
Block a user