Skip to content

Commit

Permalink
🏗️ 更换布局系统以实现 HMR (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
A-kirami authored Dec 2, 2024
1 parent 6f699d0 commit 9340e25
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"unplugin-vue-router": "^0.10.8",
"vite": "^5.4.11",
"vite-plugin-vue-devtools": "^7.6.7",
"vite-plugin-vue-layouts": "^0.11.0",
"vite-plugin-vue-meta-layouts": "^0.5.1",
"vitest": "^2.1.6",
"vue-eslint-parser": "^9.4.3",
"vue-tsc": "^2.1.10"
Expand Down
23 changes: 9 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setupLayouts } from 'virtual:generated-layouts'
import { setupLayouts } from 'virtual:meta-layouts'
import { createRouter, createWebHistory } from 'vue-router'
import { routes } from 'vue-router/auto-routes'

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"types": [
"vite/client",
"vitest/globals",
"vite-plugin-vue-layouts/client",
"vite-plugin-vue-meta-layouts/client",
"unplugin-vue-macros/macros-global",
"unplugin-vue-router/client",
"unplugin-info/client"
Expand Down
6 changes: 2 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { VueRouterAutoImports } from 'unplugin-vue-router'
import VueRouter from 'unplugin-vue-router/vite'
import { defineConfig } from 'vite'
import VueDevTools from 'vite-plugin-vue-devtools'
import Layouts from 'vite-plugin-vue-layouts'
import MetaLayouts from 'vite-plugin-vue-meta-layouts'

import type { UserConfig } from 'vite'

Expand All @@ -34,9 +34,7 @@ export default defineConfig({
},
betterDefine: false,
}),
Layouts({
pagesDirs: 'src/views',
}),
MetaLayouts(),
AutoImport({
imports: [
'vue',
Expand Down

0 comments on commit 9340e25

Please sign in to comment.