]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
fix: should work with nuxt
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 21 Oct 2021 15:19:52 +0000 (17:19 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 21 Oct 2021 15:19:52 +0000 (17:19 +0200)
packages/nuxt/package.json
packages/nuxt/src/index.ts

index dede5ebe5a4fc939ce7785bd4552ae536971dc83..604dcb1ea03b4a36f8a5d492d9db86e8010cb2d6 100644 (file)
@@ -29,6 +29,7 @@
       "require": "./dist/index.js",
       "import": "./dist/index.mjs"
     },
+    "./dist/templates/*": "./dist/templates/*",
     "./templates/*": "./dist/templates/*"
   },
   "main": "./dist/index.js",
     "dist/*.js",
     "dist/*.mjs",
     "dist/*.d.ts",
-    "dist/templates/*.js"
+    "dist/templates/*.js",
+    "dist/templates/*.mjs"
   ],
   "scripts": {
-    "build": "siroc",
+    "build": "siroc build",
     "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . -l @pinia/nuxt -r 1"
   },
   "dependencies": {
index 030de9962d71869f9882d293c939560d2007b6b0..a6fd55a8d25dfed5432b85d185175e4b86f79aa1 100644 (file)
@@ -32,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: require.resolve('./templates/plugin') })
+    addPlugin({ src: require.resolve('./templates/plugin.mjs') })
 
     // transpile pinia for nuxt 2 and nuxt bridge
     if (isVue2 && !nuxt.options.build.transpile.includes('pinia')) {