vike-vue-pinia
Advanced tools
@@ -5,4 +5,4 @@ import type { Pinia, StateTree } from 'pinia'; | ||
onCreateApp: string; | ||
onAfterRenderSSRApp: string; | ||
onBeforeMountApp: string; | ||
onAfterRenderHtml: string; | ||
onBeforeRenderClient: string; | ||
}; | ||
@@ -9,0 +9,0 @@ export default _default; |
export default { | ||
name: 'vike-vue-pinia', | ||
onCreateApp: 'import:vike-vue-pinia/renderer/installPinia:installPinia', | ||
onAfterRenderSSRApp: 'import:vike-vue-pinia/renderer/dehydratePinia:dehydratePinia', | ||
onBeforeMountApp: 'import:vike-vue-pinia/renderer/hydratePinia:hydratePinia', | ||
onAfterRenderHtml: 'import:vike-vue-pinia/renderer/dehydratePinia:dehydratePinia', | ||
onBeforeRenderClient: 'import:vike-vue-pinia/renderer/hydratePinia:hydratePinia', | ||
}; |
@@ -1,3 +0,3 @@ | ||
import type { OnAfterRenderSSRAppSync } from 'vike-vue/types'; | ||
import type { OnAfterRenderHtmlSync } from 'vike-vue/types'; | ||
export { dehydratePinia }; | ||
declare const dehydratePinia: OnAfterRenderSSRAppSync; | ||
declare const dehydratePinia: OnAfterRenderHtmlSync; |
@@ -1,3 +0,3 @@ | ||
import type { OnBeforeMountAppSync } from 'vike-vue/types'; | ||
import type { OnBeforeRenderClientSync } from 'vike-vue/types'; | ||
export { hydratePinia }; | ||
declare const hydratePinia: OnBeforeMountAppSync; | ||
declare const hydratePinia: OnBeforeRenderClientSync; |
export { hydratePinia }; | ||
const hydratePinia = ({ pinia, fromHtmlRenderer }) => { | ||
const hydratePinia = ({ pinia, fromHtmlRenderer, isHydration, }) => { | ||
if (!isHydration) { | ||
return; | ||
} | ||
const { piniaInitialState } = fromHtmlRenderer; | ||
@@ -4,0 +7,0 @@ if (!pinia || !piniaInitialState) { |
{ | ||
"name": "vike-vue-pinia", | ||
"version": "0.0.5", | ||
"version": "0.1.0", | ||
"description": "", | ||
@@ -50,3 +50,3 @@ "main": "./dist/+config.js", | ||
"vike": "^0.4.172", | ||
"vike-vue": "^0.6.8", | ||
"vike-vue": "^0.7.0", | ||
"vue": "^3.4.23", | ||
@@ -53,0 +53,0 @@ "vue-tsc": "^2.0.13" |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3770
1.84%56
5.66%1
Infinity%