]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
refactor: still trying to get this working...
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 21 Oct 2021 12:53:29 +0000 (14:53 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 21 Oct 2021 12:53:29 +0000 (14:53 +0200)
packages/nuxt/package.json
packages/nuxt/src/index.ts

index 942d4b8d5c934dd9e665f501e6bb34bd621e5fa8..45f836e4e0ac294bab316bfae92743df2dddbd3c 100644 (file)
@@ -29,7 +29,7 @@
       "require": "./dist/index.js",
       "import": "./dist/index.mjs"
     },
-    "./src/templates/*": "./dist/templates/*.js"
+    "./templates/*": "./dist/templates/*.js"
   },
   "main": "./dist/index.js",
   "module": "./dist/index.mjs",
index e68dc44e3323426462bcacc720db85315f597ed4..030de9962d71869f9882d293c939560d2007b6b0 100644 (file)
@@ -1,7 +1,6 @@
 /**
  * @module @pinia/nuxt
  */
-import { resolve } from 'upath'
 import { addPlugin, defineNuxtModule } from '@nuxt/kit'
 import { isVue2 } from 'vue-demi'
 import type { Pinia } from 'pinia'
@@ -33,7 +32,7 @@ const module = defineNuxtModule<PiniaNuxtOptions>({
     // but doesn't have the type: module in its packages.json file
     nuxt.options.alias.pinia = 'pinia/index.mjs'
 
-    addPlugin({ src: resolve(__dirname, './templates/plugin.js') })
+    addPlugin({ src: require.resolve('./templates/plugin') })
 
     // transpile pinia for nuxt 2 and nuxt bridge
     if (isVue2 && !nuxt.options.build.transpile.includes('pinia')) {