Nuxt Setup


Installation

Yarn
yarn add pinia-orm @pinia-orm/nuxt
NPM
npm install @pinia-orm/nuxt --save

Configuration

If your using Nuxt 2 you also need to stick nanoid to version 3.3.4. This is related to ai/nanoid#365

E.g. yarn
package.json
...  "resolutions": {    "nanoid": "3.3.4"  }...
Nuxt 3
import { defineNuxtConfig } from 'nuxt3'export default defineNuxtConfig({  modules: [    '@pinia/nuxt',     '@pinia-orm/nuxt'  ]})
Nuxt 2
export default {  buildModules: [  '@nuxtjs/composition-api/module',  '@pinia/nuxt'  ],  modules: ['@pinia-orm/nuxt'],  // Related to https://github.com/nuxt/nuxt.js/issues/7822  build: {    transpile: [      'pinia-orm'    ]  },}