File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -62,14 +62,11 @@ const module: NuxtModule<ModuleOptions> = defineNuxtModule<ModuleOptions>({
6262 // Transpile runtime
6363 nuxt . options . build . transpile . push ( resolve ( runtimeDir ) )
6464
65- // dedupe pinia only if not building for SSR
66- // https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue/src/index.ts#L221
67- if ( ! nuxt . options . vite ?. build ?. ssr ) {
68- nuxt . options . vite . resolve ??= { }
69- nuxt . options . vite . resolve . dedupe ??= [ ]
70- if ( ! nuxt . options . vite . resolve . dedupe . includes ( 'pinia' ) ) {
71- nuxt . options . vite . resolve . dedupe . push ( 'pinia' )
72- }
65+ // avoids having multiple copies of pinia
66+ nuxt . options . vite . optimizeDeps ??= { }
67+ nuxt . options . vite . optimizeDeps . exclude ??= [ ]
68+ if ( ! nuxt . options . vite . optimizeDeps . exclude . includes ( 'pinia' ) ) {
69+ nuxt . options . vite . optimizeDeps . exclude . push ( 'pinia' )
7370 }
7471
7572 nuxt . hook ( 'prepare:types' , ( { references } ) => {
You can’t perform that action at this time.
0 commit comments