]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs(nuxt): fix options (#1997)
authorRednas <s.sierdsma@gmail.com>
Mon, 13 Feb 2023 14:24:40 +0000 (15:24 +0100)
committerEduardo San Martin Morote <posva@users.noreply.github.com>
Wed, 15 Feb 2023 09:52:57 +0000 (10:52 +0100)
Co-authored-by: Eduardo San Martin Morote <posva13@gmail.com>
packages/docs/ssr/nuxt.md

index 863f75177eeef94a00d1465dc8d2515d52e314a2..c1fd41cd6dbb85e6e5e7a28f3e52cc4c3bda6244 100644 (file)
@@ -67,20 +67,14 @@ By default `@pinia/nuxt` exposes one single auto import: `usePinia()`, which is
 // nuxt.config.js
 export default defineNuxtConfig({
   // ... other options
-  modules: [
-    // ...
-    [
-      '@pinia/nuxt',
-      {
-        autoImports: [
-          // automatically imports `defineStore`
-          'defineStore', // import { defineStore } from 'pinia'
-          // automatically imports `defineStore` as `definePiniaStore`
-          ['defineStore', 'definePiniaStore'], // import { defineStore as definePiniaStore } from 'pinia'
-        ],
-      },
+  modules: ['@pinia/nuxt'],
+  pinia: {
+    autoImports: [
+      // automatically imports `defineStore`
+      'defineStore', // import { defineStore } from 'pinia'
+      ['defineStore', 'definePiniaStore'], // import { defineStore as definePiniaStore } from 'pinia'
     ],
-  ],
+  },
 })
 ```