import { createSSRApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persistedstate'
import App from './App.vue'

// 创建Pinia实例
const pinia = createPinia()
// 使用piniaPersist插件
pinia.use(piniaPersist)

export function createApp() {
  const app = createSSRApp(App)
  // 使用Pinia
  app.use(pinia)
  
  return {
    app,
  }
}