Skip to content

Commit

Permalink
fix(nuxt): point to the correct dist file
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Oct 14, 2021
1 parent 5f8129a commit 438b16d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/nuxt/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const module = defineNuxtModule<PiniaNuxtOptions>({
nuxt.options.features.store = false
}

// make sure we use the mjs for pinia so node doesn't complain about using a module js with an extension that is js
// but doesn't have the type: module in its packages.json file
nuxt.options.alias.pinia = 'pinia/pinia.mjs'

addPlugin({ src: resolve(__dirname, '../templates/plugin.js') })

// Define pinia resolution to ensure plugins register global context successfully
Expand Down

0 comments on commit 438b16d

Please sign in to comment.