diff --git a/index.html b/index.html index 022cea97..9d1bd960 100644 --- a/index.html +++ b/index.html @@ -16,6 +16,6 @@
- + diff --git a/package.json b/package.json index 6f8b574b..5f91b07d 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "preview": "vite preview" }, "dependencies": { - "@vue/server-renderer": "^3.3.6", "@vueup/vue-quill": "^1.2.0", "animate.css": "^4.1.1", "dayjs": "^1.11.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1e6736e6..de78003c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,9 +5,6 @@ settings: excludeLinksFromLockfile: false dependencies: - '@vue/server-renderer': - specifier: ^3.3.6 - version: 3.3.6(vue@3.3.6) '@vueup/vue-quill': specifier: ^1.2.0 version: 1.2.0(vue@3.3.6) diff --git a/src/entry-client.ts b/src/entry-client.ts deleted file mode 100644 index 5a068a07..00000000 --- a/src/entry-client.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createApp } from './main' -import router from './router' -import i18n from '@/language/i18n' -import { setupRouterGuard } from '@/router/guard' -import { setupPinia } from '@/store/index' -import '@/styles/index.scss' - -const { app } = createApp() - -// 使用路由守卫 -setupRouterGuard(router) -// 使用 pinia -setupPinia(app) - -app.use(router).use(i18n).mount('#app') diff --git a/src/main.ts b/src/main.ts index 671f9ba4..0a96745b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,24 @@ -import { createSSRApp } from 'vue' +// core +import { createApp } from 'vue' +// APP import App from './App.vue' +/* 引入 vue-router */ +import router from './router' +// 引入 i18n +import i18n from '@/language/i18n' +// 引入路由守卫 +import { setupRouterGuard } from '@/router/guard' +// 引入 pinia +import { setupPinia } from '@/store/index' +// 引入样式 +import '@/styles/index.scss' -export const createApp = () => { - const app = createSSRApp(App) - return { app } -} +// 获取 App 实例 +const app = createApp(App) + +// 使用路由守卫 +setupRouterGuard(router) +// 使用 pinia +setupPinia(app) + +app.use(router).use(i18n).mount('#app')