11import { Pinia , PiniaPlugin , setActivePinia , piniaSymbol } from './rootStore'
2- import { ref , App , markRaw , effectScope , isVue2 , Ref } from 'vue-demi '
2+ import { ref , App , markRaw , effectScope , Ref } from 'vue'
33import { registerPiniaDevtools , devtoolsPlugin } from './devtools'
44import { IS_CLIENT } from './env'
55import { StateTree , StoreGeneric } from './types'
@@ -24,21 +24,19 @@ export function createPinia(): Pinia {
2424 // this allows calling useStore() outside of a component setup after
2525 // installing pinia's plugin
2626 setActivePinia ( pinia )
27- if ( ! isVue2 ) {
28- pinia . _a = app
29- app . provide ( piniaSymbol , pinia )
30- app . config . globalProperties . $pinia = pinia
31- /* istanbul ignore else */
32- if ( __USE_DEVTOOLS__ && IS_CLIENT ) {
33- registerPiniaDevtools ( app , pinia )
34- }
35- toBeInstalled . forEach ( ( plugin ) => _p . push ( plugin ) )
36- toBeInstalled = [ ]
27+ pinia . _a = app
28+ app . provide ( piniaSymbol , pinia )
29+ app . config . globalProperties . $pinia = pinia
30+ /* istanbul ignore else */
31+ if ( __USE_DEVTOOLS__ && IS_CLIENT ) {
32+ registerPiniaDevtools ( app , pinia )
3733 }
34+ toBeInstalled . forEach ( ( plugin ) => _p . push ( plugin ) )
35+ toBeInstalled = [ ]
3836 } ,
3937
4038 use ( plugin ) {
41- if ( ! this . _a && ! isVue2 ) {
39+ if ( ! this . _a ) {
4240 toBeInstalled . push ( plugin )
4341 } else {
4442 _p . push ( plugin )
0 commit comments