import { ViteSSG } from 'vite-ssg' import App from './App.vue' import { routes } from './routes' import './style.css' import directives from './directives/index' export const createApp = ViteSSG(App, { routes, base: import.meta.env.BASE_URL, }, ({ app, router, routes, isClient, initialState }) => { // 注册全局指令 app.use(directives) } )