main.js 349 B

12345678910111213141516171819
  1. import App from './App'
  2. import {
  3. createSSRApp
  4. } from 'vue'
  5. import * as Pinia from 'pinia'
  6. import {
  7. createUnistorage
  8. } from '@/uni_modules/pinia-plugin-unistorage/index.js'
  9. export function createApp() {
  10. const app = createSSRApp(App)
  11. const store = Pinia.createPinia()
  12. store.use(createUnistorage())
  13. app.use(store);
  14. return {
  15. app,
  16. Pinia,
  17. }
  18. }