Skip to content

Commit 438b16d

Browse files
committed
fix(nuxt): point to the correct dist file
1 parent 5f8129a commit 438b16d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/nuxt/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ const module = defineNuxtModule<PiniaNuxtOptions>({
2828
nuxt.options.features.store = false
2929
}
3030

31+
// make sure we use the mjs for pinia so node doesn't complain about using a module js with an extension that is js
32+
// but doesn't have the type: module in its packages.json file
33+
nuxt.options.alias.pinia = 'pinia/pinia.mjs'
34+
3135
addPlugin({ src: resolve(__dirname, '../templates/plugin.js') })
3236

3337
// Define pinia resolution to ensure plugins register global context successfully

0 commit comments

Comments
 (0)