From: Eduardo San Martin Morote Date: Thu, 14 Oct 2021 09:57:19 +0000 (+0200) Subject: fix(nuxt): point to the correct dist file X-Git-Tag: @pinia/nuxt@0.0.5~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=438b16dfd3dd5052be437d2e7382f9f4f497eea3;p=thirdparty%2Fvuejs%2Fpinia.git fix(nuxt): point to the correct dist file --- diff --git a/packages/nuxt/src/index.ts b/packages/nuxt/src/index.ts index 01a5e1d8..5c4eebe5 100644 --- a/packages/nuxt/src/index.ts +++ b/packages/nuxt/src/index.ts @@ -28,6 +28,10 @@ const module = defineNuxtModule({ 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