Skip to content

Commit

Permalink
Pinia module options
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryjappinen committed Nov 7, 2023
1 parent 93d1ca8 commit b695201
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions nuxt/config/pinia.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
// https://pinia.vuejs.org/
export default (optionsInput) => {
const {
persist
persist,
storesDirs
} = (optionsInput || {})

// Pinia module options
const moduleOptions = {}
if (storesDirs) {
moduleOptions.storesDirs = storesDirs
}

const modules = [
['@pinia/nuxt', {
autoImports: ['defineStore']
}]
['@pinia/nuxt', moduleOptions]
]

// https://github.com/prazdevs/pinia-plugin-persistedstate/blob/main/docs/frameworks/nuxt-3.md
Expand Down

0 comments on commit b695201

Please sign in to comment.