Closed CCherry07 closed 1 month ago
code :
import { createPinia, defineStore } from 'pinia' import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' const pinia = createPinia() pinia.use(piniaPluginPersistedstate) // config -> { persist: true } export const createStore = <T>(storeId: string, defineSetup: () => T, config?: unknown) => { return () => defineStore(storeId, defineSetup, config)(pinia) }
https://stackblitz.com/edit/vitejs-vite-6fthbm?file=package.json,src%2FApp.vue,src%2Fstore%2FuseCount.ts,vite.config.ts
System: OS: macOS 14.4.1 CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz Memory: 183.73 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 16.20.2 - ~/.nvm/versions/node/v16.20.2/bin/node Yarn: 1.22.21 - /usr/local/bin/yarn npm: 8.19.4 - ~/.nvm/versions/node/v16.20.2/bin/npm pnpm: 8.13.1 - /usr/local/bin/pnpm Browsers: Chrome: 123.0.6312.87 Edge: 123.0.2420.65 Safari: 17.4.1
pnpm
Hi, I seem to be experiencing a similar issue when using pinia globally via setActivePinia for web components. Here's a repro: https://stackblitz.com/edit/vitejs-vite-7fdisv?file=src%2Fmain.ts
Describe the bug
code :
Reproduction
https://stackblitz.com/edit/vitejs-vite-6fthbm?file=package.json,src%2FApp.vue,src%2Fstore%2FuseCount.ts,vite.config.ts
System Info
Used Package Manager
pnpm
Validations