import { createSSRApp } from 'vue'
import App from './App.vue'

import * as Pinia from 'pinia'
import './styles/global.scss'
import './styles/font.scss'
import './styles/iconfont.scss'
import PiniaPluginPersist from './plugins/pinia-plugin-persist'
import BackBar from '@/components/BackBar/index.vue'

export function createApp() {
  const app = createSSRApp(App)
  const pinia = Pinia.createPinia()
  pinia.use(PiniaPluginPersist)
  app.use(pinia)
  app.component('BackBar', BackBar)
  return {
    app,
    Pinia,
  }
}
