diff --git a/package.json b/package.json index b3fcd93..bbaa69b 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "vite-plugin-vuetify": "^1.0.2", "vue": "^3.3.4", "vue-demi": "^0.14.5", - "vue-i18n": "^9.2.2", + "vue-i18n": "^9.3.0-beta.19", "vue-router": "^4.2.2", "vuetify": "^3.3.5" }, @@ -61,8 +61,8 @@ "vite-plugin-pwa": "^0.16.4", "vite-plugin-vue-component-preview": "^1.1.6", "vite-plugin-vue-inspector": "^3.4.2", - "vite-plugin-vue-layouts": "^0.8.0", "vite-plugin-vue-markdown": "^0.23.5", + "vite-plugin-vue-meta-layouts": "^0.2.2", "vite-ssg": "^0.22.2", "vite-ssg-sitemap": "^0.5.1", "vitest": "^0.32.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4a23a55..16709a1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,14 +33,14 @@ dependencies: specifier: ^0.14.5 version: 0.14.5(vue@3.3.4) vue-i18n: - specifier: ^9.2.2 - version: 9.2.2(vue@3.3.4) + specifier: ^9.3.0-beta.19 + version: 9.3.0-beta.19(vue@3.3.4) vue-router: specifier: ^4.2.2 version: 4.2.2(vue@3.3.4) vuetify: specifier: ^3.3.5 - version: 3.3.5(typescript@5.1.3)(vite-plugin-vuetify@1.0.2)(vue-i18n@9.2.2)(vue@3.3.4) + version: 3.3.5(typescript@5.1.3)(vite-plugin-vuetify@1.0.2)(vue-i18n@9.3.0-beta.19)(vue@3.3.4) devDependencies: '@antfu/eslint-config': @@ -54,7 +54,7 @@ devDependencies: version: 1.1.57 '@intlify/unplugin-vue-i18n': specifier: ^0.11.0 - version: 0.11.0(rollup@3.25.1)(vue-i18n@9.2.2) + version: 0.11.0(rollup@3.25.1)(vue-i18n@9.3.0-beta.19) '@mdi/font': specifier: ^7.2.96 version: 7.2.96 @@ -139,12 +139,12 @@ devDependencies: vite-plugin-vue-inspector: specifier: ^3.4.2 version: 3.4.2(vite@4.3.9) - vite-plugin-vue-layouts: - specifier: ^0.8.0 - version: 0.8.0(vite@4.3.9)(vue-router@4.2.2)(vue@3.3.4) vite-plugin-vue-markdown: specifier: ^0.23.5 version: 0.23.5(rollup@3.25.1)(vite@4.3.9) + vite-plugin-vue-meta-layouts: + specifier: ^0.2.2 + version: 0.2.2(vite@4.3.9)(vue-router@4.2.2) vite-ssg: specifier: ^0.22.2 version: 0.22.2(@vueuse/head@1.1.26)(critters@0.0.16)(vite@4.3.9)(vue-router@4.2.2)(vue@3.3.4) @@ -1852,7 +1852,7 @@ packages: - supports-color dev: true - /@intlify/bundle-utils@6.0.1(vue-i18n@9.2.2): + /@intlify/bundle-utils@6.0.1(vue-i18n@9.3.0-beta.19): resolution: {integrity: sha512-BkeZNKZiC0B7K3OYMwiPLoAqsZmKH3SxTL75vYAkuQ//XWR8WO0NpfjXhTxgLTVFHxMcNb2agAopC0DP6fqDrg==} engines: {node: '>= 14.16'} peerDependencies: @@ -1873,31 +1873,24 @@ packages: magic-string: 0.30.0 mlly: 1.4.0 source-map: 0.6.1 - vue-i18n: 9.2.2(vue@3.3.4) + vue-i18n: 9.3.0-beta.19(vue@3.3.4) yaml-eslint-parser: 0.3.2 dev: true - /@intlify/core-base@9.2.2: - resolution: {integrity: sha512-JjUpQtNfn+joMbrXvpR4hTF8iJQ2sEFzzK3KIESOx+f+uwIjgw20igOyaIdhfsVVBCds8ZM64MoeNSx+PHQMkA==} - engines: {node: '>= 14'} + /@intlify/core-base@9.3.0-beta.19: + resolution: {integrity: sha512-mlpVZ1w6ZwnP9QZAs+RzGuFMCuYjZPboX3hX7JzhV49vUcsLj0R4667cmcLpPZzXJguIy/zaqbIyoUvLV8HONQ==} + engines: {node: '>= 16'} dependencies: - '@intlify/devtools-if': 9.2.2 - '@intlify/message-compiler': 9.2.2 - '@intlify/shared': 9.2.2 - '@intlify/vue-devtools': 9.2.2 + '@intlify/devtools-if': 9.3.0-beta.19 + '@intlify/message-compiler': 9.3.0-beta.19 + '@intlify/shared': 9.3.0-beta.19 + '@intlify/vue-devtools': 9.3.0-beta.19 - /@intlify/devtools-if@9.2.2: - resolution: {integrity: sha512-4ttr/FNO29w+kBbU7HZ/U0Lzuh2cRDhP8UlWOtV9ERcjHzuyXVZmjyleESK6eVP60tGC9QtQW9yZE+JeRhDHkg==} - engines: {node: '>= 14'} + /@intlify/devtools-if@9.3.0-beta.19: + resolution: {integrity: sha512-L4NyqMcuQURejKy9XX0m/2kb37f56NAUvbiXKRx96pahSBclY6T+E0TrKXup0Hx6T0qY55QYGRwyVLeHXIHAMA==} + engines: {node: '>= 16'} dependencies: - '@intlify/shared': 9.2.2 - - /@intlify/message-compiler@9.2.2: - resolution: {integrity: sha512-IUrQW7byAKN2fMBe8z6sK6riG1pue95e5jfokn8hA5Q3Bqy4MBJ5lJAofUsawQJYHeoPJ7svMDyBaVJ4d0GTtA==} - engines: {node: '>= 14'} - dependencies: - '@intlify/shared': 9.2.2 - source-map: 0.6.1 + '@intlify/shared': 9.3.0-beta.19 /@intlify/message-compiler@9.3.0-beta.17: resolution: {integrity: sha512-i7hvVIRk1Ax2uKa9xLRJCT57to08OhFMhFXXjWN07rmx5pWQYQ23MfX1xgggv9drnWTNhqEiD+u4EJeHoS5+Ww==} @@ -1907,16 +1900,23 @@ packages: source-map: 0.6.1 dev: true - /@intlify/shared@9.2.2: - resolution: {integrity: sha512-wRwTpsslgZS5HNyM7uDQYZtxnbI12aGiBZURX3BTR9RFIKKRWpllTsgzHWvj3HKm3Y2Sh5LPC1r0PDCKEhVn9Q==} - engines: {node: '>= 14'} + /@intlify/message-compiler@9.3.0-beta.19: + resolution: {integrity: sha512-5RBn5tMOsWh5FqM65IfEJvfpRS8R0lHEUVNDa2rNc9Y7oGEI7swezlbFqU9Kc5FyHy5Kx2jHtdgFIipDwnIYFQ==} + engines: {node: '>= 16'} + dependencies: + '@intlify/shared': 9.3.0-beta.19 + source-map: 0.6.1 /@intlify/shared@9.3.0-beta.17: resolution: {integrity: sha512-mscf7RQsUTOil35jTij4KGW1RC9SWQjYScwLxP53Ns6g24iEd5HN7ksbt9O6FvTmlQuX77u+MXpBdfJsGqizLQ==} engines: {node: '>= 14'} dev: true - /@intlify/unplugin-vue-i18n@0.11.0(rollup@3.25.1)(vue-i18n@9.2.2): + /@intlify/shared@9.3.0-beta.19: + resolution: {integrity: sha512-+lhQggrLvlQ/O5OmIYAc9gadcYXMoaDi0Doef+X/f6TLZFr9PTMjOpBWmpwNNHi026e54jckntUn6GzqDtIN4w==} + engines: {node: '>= 16'} + + /@intlify/unplugin-vue-i18n@0.11.0(rollup@3.25.1)(vue-i18n@9.3.0-beta.19): resolution: {integrity: sha512-ivcLZo08fvepHWV8o5lcKfhcKFSWqhwrqIAU6pUIbvq2ICo9fnXnIPYIZj7FeuHDLW1G3ADm44ZhQC3nYmvDlg==} engines: {node: '>= 14.16'} peerDependencies: @@ -1931,7 +1931,7 @@ packages: vue-i18n-bridge: optional: true dependencies: - '@intlify/bundle-utils': 6.0.1(vue-i18n@9.2.2) + '@intlify/bundle-utils': 6.0.1(vue-i18n@9.3.0-beta.19) '@intlify/shared': 9.3.0-beta.17 '@rollup/pluginutils': 5.0.2(rollup@3.25.1) '@vue/compiler-sfc': 3.3.4 @@ -1943,18 +1943,18 @@ packages: picocolors: 1.0.0 source-map: 0.6.1 unplugin: 1.3.1 - vue-i18n: 9.2.2(vue@3.3.4) + vue-i18n: 9.3.0-beta.19(vue@3.3.4) transitivePeerDependencies: - rollup - supports-color dev: true - /@intlify/vue-devtools@9.2.2: - resolution: {integrity: sha512-+dUyqyCHWHb/UcvY1MlIpO87munedm3Gn6E9WWYdWrMuYLcoIoOEVDWSS8xSwtlPU+kA+MEQTP6Q1iI/ocusJg==} - engines: {node: '>= 14'} + /@intlify/vue-devtools@9.3.0-beta.19: + resolution: {integrity: sha512-7yz8sUbovPUIf8sCX3+sMdw/xEyeHKBCc7Agxcxv54PiQz3zwsVl0hC1X+JXUy46FiPsMEoFfY8O27xOFLupaw==} + engines: {node: '>= 16'} dependencies: - '@intlify/core-base': 9.2.2 - '@intlify/shared': 9.2.2 + '@intlify/core-base': 9.3.0-beta.19 + '@intlify/shared': 9.3.0-beta.19 /@isaacs/cliui@8.0.2: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -3305,7 +3305,7 @@ packages: find-cache-dir: 3.3.2 upath: 2.0.1 vue: 3.3.4 - vuetify: 3.3.5(typescript@5.1.3)(vite-plugin-vuetify@1.0.2)(vue-i18n@9.2.2)(vue@3.3.4) + vuetify: 3.3.5(typescript@5.1.3)(vite-plugin-vuetify@1.0.2)(vue-i18n@9.3.0-beta.19)(vue@3.3.4) dev: false /@vueuse/core@10.2.0(vue@3.3.4): @@ -9359,23 +9359,6 @@ packages: - supports-color dev: true - /vite-plugin-vue-layouts@0.8.0(vite@4.3.9)(vue-router@4.2.2)(vue@3.3.4): - resolution: {integrity: sha512-UZW2nSV2LraTSe7gsAL46hfdi7a0X1RvkGGoJVtA2O8beu7anzpXFwQLou8+kHy31CzVycT4gIPySBsHhtBN5g==} - peerDependencies: - vite: ^2.5.0 || ^3.0.0-0 || ^4.0.0 - vue: ^2.6.12 || ^3.2.4 - vue-router: ^3.5.1 || ^4.0.11 - dependencies: - '@vue/compiler-sfc': 3.3.4 - debug: 4.3.4(supports-color@8.1.1) - fast-glob: 3.2.12 - vite: 4.3.9(@types/node@20.3.1) - vue: 3.3.4 - vue-router: 4.2.2(vue@3.3.4) - transitivePeerDependencies: - - supports-color - dev: true - /vite-plugin-vue-markdown@0.22.6(rollup@3.25.1)(vite@4.3.9): resolution: {integrity: sha512-BB0/yYoRO+4hceFZRgU/iAOpgklFvo/eHLapOkavIoDkP0jeoQubOMTEF8K4FuYRX9jaN5WcP2TrfhUgc7RuUg==} peerDependencies: @@ -9410,6 +9393,17 @@ packages: - rollup dev: true + /vite-plugin-vue-meta-layouts@0.2.2(vite@4.3.9)(vue-router@4.2.2): + resolution: {integrity: sha512-u3WHlSzqE7tfOFFN7IygkQXDgnhVYD+GSfSXeMk1m/xI/gMtJtLeVwjBTow4kOn3oEkJcj/I9yCZoWpQeRHTFw==} + peerDependencies: + vite: '>=2.0.0' + vue-router: '>=4.0.14' + dependencies: + local-pkg: 0.4.3 + vite: 4.3.9(@types/node@20.3.1) + vue-router: 4.2.2(vue@3.3.4) + dev: true + /vite-plugin-vuetify@1.0.2(vite@4.3.9)(vue@3.3.4)(vuetify@3.3.5): resolution: {integrity: sha512-MubIcKD33O8wtgQXlbEXE7ccTEpHZ8nPpe77y9Wy3my2MWw/PgehP9VqTp92BLqr0R1dSL970Lynvisx3UxBFw==} engines: {node: '>=12'} @@ -9421,7 +9415,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) upath: 2.0.1 vite: 4.3.9(@types/node@20.3.1) - vuetify: 3.3.5(typescript@5.1.3)(vite-plugin-vuetify@1.0.2)(vue-i18n@9.2.2)(vue@3.3.4) + vuetify: 3.3.5(typescript@5.1.3)(vite-plugin-vuetify@1.0.2)(vue-i18n@9.3.0-beta.19)(vue@3.3.4) transitivePeerDependencies: - supports-color - vue @@ -9608,15 +9602,15 @@ packages: - supports-color dev: true - /vue-i18n@9.2.2(vue@3.3.4): - resolution: {integrity: sha512-yswpwtj89rTBhegUAv9Mu37LNznyu3NpyLQmozF3i1hYOhwpG8RjcjIFIIfnu+2MDZJGSZPXaKWvnQA71Yv9TQ==} - engines: {node: '>= 14'} + /vue-i18n@9.3.0-beta.19(vue@3.3.4): + resolution: {integrity: sha512-1pbEcoAbxaAPuR5hODnQJ5CtIimnVD+aUVnCztuuRaOZPLP1i4FxkWVvb1lu8JIRC5pePyODZxi3yoy3PUYheA==} + engines: {node: '>= 16'} peerDependencies: vue: ^3.0.0 dependencies: - '@intlify/core-base': 9.2.2 - '@intlify/shared': 9.2.2 - '@intlify/vue-devtools': 9.2.2 + '@intlify/core-base': 9.3.0-beta.19 + '@intlify/shared': 9.3.0-beta.19 + '@intlify/vue-devtools': 9.3.0-beta.19 '@vue/devtools-api': 6.5.0 vue: 3.3.4 @@ -9656,7 +9650,7 @@ packages: '@vue/server-renderer': 3.3.4(vue@3.3.4) '@vue/shared': 3.3.4 - /vuetify@3.3.5(typescript@5.1.3)(vite-plugin-vuetify@1.0.2)(vue-i18n@9.2.2)(vue@3.3.4): + /vuetify@3.3.5(typescript@5.1.3)(vite-plugin-vuetify@1.0.2)(vue-i18n@9.3.0-beta.19)(vue@3.3.4): resolution: {integrity: sha512-vkfPgPmKfSJa+jq6Ov+CTg7L1t2jLPKa7Slef9OrVHcLqg+gLuIj0z4PJE6E9HjFTUbgZShShOGxps52REJRIA==} engines: {node: ^12.20 || >=14.13} peerDependencies: @@ -9678,7 +9672,7 @@ packages: typescript: 5.1.3 vite-plugin-vuetify: 1.0.2(vite@4.3.9)(vue@3.3.4)(vuetify@3.3.5) vue: 3.3.4 - vue-i18n: 9.2.2(vue@3.3.4) + vue-i18n: 9.3.0-beta.19(vue@3.3.4) dev: false /w3c-xmlserializer@4.0.0: diff --git a/src/main.ts b/src/main.ts index 4712898..6f068d1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,6 @@ import { ViteSSG } from 'vite-ssg' -import { setupLayouts } from 'virtual:generated-layouts' +import { setupLayouts } from 'virtual:meta-layouts' + import App from './App.vue' import type { UserModule } from './types' import vuetify from './plugins/vuetify' diff --git a/tsconfig.json b/tsconfig.json index 9c3b383..9ebabf6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,7 +23,8 @@ // "vite-plugin-vue-layouts/client", "vite-plugin-pwa/client", "unplugin-vue-macros/macros-global", - "vite-plugin-vue-layouts/client.d.ts" + // "vite-plugin-vue-layouts/client.d.ts" + "vite-plugin-vue-meta-layouts/client" ], "paths": { "~/*": ["src/*"] diff --git a/vite.config.ts b/vite.config.ts index 68cbbfb..132489b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,9 +1,11 @@ -import path from 'path' +import path from 'node:path' import { defineConfig } from 'vite' import Vue from '@vitejs/plugin-vue' import Pages from 'vite-plugin-pages' import generateSitemap from 'vite-ssg-sitemap' -import Layouts from 'vite-plugin-vue-layouts' + +// import Layouts from 'vite-plugin-vue-layouts' +import MetaLayouts from 'vite-plugin-vue-meta-layouts' import Components from 'unplugin-vue-components/vite' import AutoImport from 'unplugin-auto-import/vite' import Markdown from 'vite-plugin-vue-markdown' @@ -45,7 +47,7 @@ export default defineConfig({ }), // https://github.com/JohnCampionJr/vite-plugin-vue-layouts - Layouts(), + MetaLayouts(), // https://github.com/antfu/unplugin-auto-import AutoImport({