Skip to content

Commit

Permalink
feat(nuxt): resolve in mono repos
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Aug 13, 2021
1 parent 711b165 commit 4716b5e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nuxt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ export default function NuxtPiniaModule(options) {
fileName: 'pinia.js',
})

this.options.build.transpile = this.options.build.transpile || []
// Define pinia resolution to ensure plugins register global context successfully
this.options.alias['pinia'] =
this.options.alias['pinia'] || this.nuxt.resolver.resolveModule('pinia')

// transpile pinia if @vue/composition-api is transpiled because we must use the same instance
this.options.build.transpile = this.options.build.transpile || []
if (
!this.options.dev &&
!this.options.build.transpile.includes('pinia') &&
Expand Down

0 comments on commit 4716b5e

Please sign in to comment.