From 5578bb5075c49cace240552337c7be2602cbfe5a Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 3 Dec 2020 09:29:44 +0800 Subject: [PATCH] chore: fix hydrate --- package.json | 6 +- pnpm-lock.yaml | 195 ++++++++++++++++++++++++++++++------------- src/main.ts | 3 +- src/plugins/index.ts | 1 + 4 files changed, 142 insertions(+), 63 deletions(-) diff --git a/package.json b/package.json index 96dbc02..debace1 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "@iconify/iconify": "^2.0.0-rc.2", "@vueuse/core": "^4.0.0-rc.5", "nprogress": "^0.2.0", - "vue": "^3.0.3", + "vue": "^3.0.4", "vue-i18n": "9.0.0-beta.8", "vue-router": "^4.0.0-rc.6" }, @@ -18,7 +18,7 @@ "@purge-icons/generated": "^0.4.1", "@types/nprogress": "^0.2.0", "@typescript-eslint/eslint-plugin": "^4.9.0", - "@vue/compiler-sfc": "^3.0.3", + "@vue/compiler-sfc": "^3.0.4", "@vuedx/typescript-plugin-vue": "^0.2.3", "autoprefixer": "^10.0.4", "chromium": "^3.0.2", @@ -34,7 +34,7 @@ "vite-plugin-md": "^0.1.3", "vite-plugin-purge-icons": "^0.4.5", "vite-plugin-pwa": "^0.1.7", - "vite-plugin-voie": "npm:@knightly/vite-plugin-voie@pr11", + "vite-plugin-voie": "^0.4.1", "voie-pages": "^0.4.0" }, "pnpm": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d1931f2..f98dad9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,18 +1,18 @@ dependencies: '@iconify/iconify': 2.0.0-rc.2 - '@vueuse/core': 4.0.0-rc.5_vue@3.0.3 + '@vueuse/core': 4.0.0-rc.5_vue@3.0.4 nprogress: 0.2.0 - vue: 3.0.3 - vue-i18n: 9.0.0-beta.8_vue@3.0.3 - vue-router: 4.0.0-rc.6_vue@3.0.3 + vue: 3.0.4 + vue-i18n: 9.0.0-beta.8_vue@3.0.4 + vue-router: 4.0.0-rc.6_vue@3.0.4 devDependencies: '@antfu/eslint-config-vue': 0.4.3_eslint@7.14.0+typescript@4.1.2 '@iconify/json': 1.1.267 '@purge-icons/generated': 0.4.1 '@types/nprogress': 0.2.0 '@typescript-eslint/eslint-plugin': 4.9.0_eslint@7.14.0+typescript@4.1.2 - '@vue/compiler-sfc': 3.0.3_vue@3.0.3 - '@vuedx/typescript-plugin-vue': 0.2.3_vue@3.0.3 + '@vue/compiler-sfc': 3.0.4_vue@3.0.4 + '@vuedx/typescript-plugin-vue': 0.2.3_vue@3.0.4 autoprefixer: 10.0.4 chromium: 3.0.2 cross-env: 7.0.3 @@ -24,11 +24,11 @@ devDependencies: typescript: 4.1.2 vite: 1.0.0-rc.13 vite-plugin-components: 0.5.0 - vite-plugin-md: 0.1.3_@vue+compiler-sfc@3.0.3 + vite-plugin-md: 0.1.3_@vue+compiler-sfc@3.0.4 vite-plugin-purge-icons: 0.4.5 vite-plugin-pwa: 0.1.7 - vite-plugin-voie: /@knightly/vite-plugin-voie/0.2.0-knightly-pr11.202012021126_cc5f94e7f7ee5c93fc7acbfd4f2beeeb - voie-pages: 0.4.0_vue@3.0.3 + vite-plugin-voie: 0.4.1_07f5ea75858e841acd411b39e12d4e31 + voie-pages: 0.4.0_vue@3.0.4 lockfileVersion: 5.2 overrides: postcss: '8' @@ -328,13 +328,13 @@ packages: resolution: integrity: sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q== /@babel/parser/7.12.3: + dev: true engines: node: '>=6.0.0' hasBin: true resolution: integrity: sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw== /@babel/parser/7.12.7: - dev: true engines: node: '>=6.0.0' hasBin: true @@ -1113,27 +1113,6 @@ packages: dev: true resolution: integrity: sha512-VKNvyALvbuwsXO7r2XvdoqdctmvJzp1/XYOXRfhJ4w+sjtWYp8T3oRGDJ0AZTafzGiBBUaMwCZVP+j87rqgD3w== - /@knightly/vite-plugin-voie/0.2.0-knightly-pr11.202012021126_cc5f94e7f7ee5c93fc7acbfd4f2beeeb: - dependencies: - fast-glob: 3.2.4 - vite: 1.0.0-rc.13 - voie-pages: /@knightly/voie-pages/0.2.0-knightly-pr11.202012021126_vue@3.0.3 - vue-router: 4.0.0-rc.6_vue@3.0.3 - dev: true - peerDependencies: - vite: ^1.0.0-rc.4 - vue: '*' - vue-router: ^4.0.0-beta.4 - resolution: - integrity: sha512-bPzG/g8VbSioVMpWtOBWfCiukcMxLncA1jAe2FHcaGPooHz3T8028ATsMnLTCSFJpNdjJlc9SQAlu7DSCoxW6g== - /@knightly/voie-pages/0.2.0-knightly-pr11.202012021126_vue@3.0.3: - dependencies: - vue-router: 4.0.0-rc.6_vue@3.0.3 - dev: true - peerDependencies: - vue: '*' - resolution: - integrity: sha512-FwTt7Ym8o5mdiMOytbiY78Z17gPiNCKL92lnpvyf4bqLgGz0LbFM8lEoYPFiDvRN0MfPjwGpXX3Hzdx4PmgWSw== /@koa/cors/3.1.0: dependencies: vary: 1.1.2 @@ -1763,8 +1742,18 @@ packages: '@vue/shared': 3.0.3 estree-walker: 2.0.1 source-map: 0.6.1 + dev: true resolution: integrity: sha512-iWlRT8RYLmz7zkg84pTOriNUzjH7XACWN++ImFkskWXWeev29IKi7p76T9jKDaMZoPiGcUZ0k9wayuASWVxOwg== + /@vue/compiler-core/3.0.4: + dependencies: + '@babel/parser': 7.12.7 + '@babel/types': 7.12.1 + '@vue/shared': 3.0.4 + estree-walker: 2.0.1 + source-map: 0.6.1 + resolution: + integrity: sha512-snpMICsbWTZqBFnPB03qr4DtiSxVYfDF3DvbDSkN9Z9NTM8Chl8E/lYhKBSsvauq91DAWAh8PU3lr9vrLyQsug== /@vue/compiler-dom/3.0.0-rc.10: dependencies: '@vue/compiler-core': 3.0.0-rc.10 @@ -1776,9 +1765,16 @@ packages: dependencies: '@vue/compiler-core': 3.0.3 '@vue/shared': 3.0.3 + dev: true resolution: integrity: sha512-6GdUbDPjsc0MDZGAgpi4lox+d+aW9/brscwBOLOFfy9wcI9b6yLPmBbjdIsJq3pYdJWbdvACdJ77avBBdHEP8A== - /@vue/compiler-sfc/3.0.0-rc.10_vue@3.0.3: + /@vue/compiler-dom/3.0.4: + dependencies: + '@vue/compiler-core': 3.0.4 + '@vue/shared': 3.0.4 + resolution: + integrity: sha512-FOxbHBIkkGjYQeTz1DlXQjS1Ms8EPXQWsdTdTPeohoS0KzCz6RiOjiAG+jLtMi6Nr5GX2h0TlCvcnI8mcsicFQ== + /@vue/compiler-sfc/3.0.0-rc.10_vue@3.0.4: dependencies: '@babel/parser': 7.11.5 '@babel/types': 7.11.5 @@ -1796,7 +1792,7 @@ packages: postcss-modules: 3.2.2 postcss-selector-parser: 6.0.2 source-map: 0.6.1 - vue: 3.0.3 + vue: 3.0.4 dev: true peerDependencies: vue: 3.0.0-rc.10 @@ -1826,6 +1822,30 @@ packages: vue: 3.0.3 resolution: integrity: sha512-YocHSirye85kRVC4lU0+SE6uhrwGJzbhwkrqG4g6kmsAUopZ0qUjbICMlej5bYx2+AUz9yBIM7hpK8nIKFVFjg== + /@vue/compiler-sfc/3.0.4_vue@3.0.4: + dependencies: + '@babel/parser': 7.12.7 + '@babel/types': 7.12.1 + '@vue/compiler-core': 3.0.4 + '@vue/compiler-dom': 3.0.4 + '@vue/compiler-ssr': 3.0.4 + '@vue/shared': 3.0.4 + consolidate: 0.16.0 + estree-walker: 2.0.1 + hash-sum: 2.0.0 + lru-cache: 5.1.1 + magic-string: 0.25.7 + merge-source-map: 1.1.0 + postcss: 8.1.10 + postcss-modules: 3.2.2 + postcss-selector-parser: 6.0.4 + source-map: 0.6.1 + vue: 3.0.4 + dev: true + peerDependencies: + vue: 3.0.4 + resolution: + integrity: sha512-brDn6HTuK6R3oBCjtMPPsIpyJEZFinlnxjtBXww/goFJOJBAU9CrsdegwyZItNnixCFUIg4CLv4Nj1Eg/eKlfg== /@vue/compiler-ssr/3.0.0-rc.10: dependencies: '@vue/compiler-dom': 3.0.0-rc.10 @@ -1840,39 +1860,74 @@ packages: dev: true resolution: integrity: sha512-IjJMoHCiDk939Ix7Q5wrex59TVJr6JFQ95gf36f4G4UrVau0GGY/3HudnWT/6eyWJ7267+odqQs1uCZgDfL/Ww== + /@vue/compiler-ssr/3.0.4: + dependencies: + '@vue/compiler-dom': 3.0.4 + '@vue/shared': 3.0.4 + dev: true + resolution: + integrity: sha512-4aYWQEL4+LS4+D44K9Z7xMOWMEjBsz4Li9nMcj2rxRQ35ewK6uFPodvs6ORP60iBDSkwUFZoldFlNemQlu1BFw== /@vue/reactivity/3.0.3: dependencies: '@vue/shared': 3.0.3 + dev: true resolution: integrity: sha512-t39Qmc42MX7wJtf8L6tHlu17eP9Rc5w4aRnxpLHNWoaRxddv/7FBhWqusJ2Bwkk8ixFHOQeejcLMt5G469WYJw== + /@vue/reactivity/3.0.4: + dependencies: + '@vue/shared': 3.0.4 + dev: false + resolution: + integrity: sha512-AFTABrLhUYZY2on3ea9FxeXal7w3f6qIp9gT+/oG93H7dFTL5LvVnxygCopv7tvkIl/GSGQb/yK1D1gmXx1Pww== /@vue/runtime-core/3.0.3: dependencies: '@vue/reactivity': 3.0.3 '@vue/shared': 3.0.3 + dev: true resolution: integrity: sha512-Fd1JVnYI6at0W/2ERwJuTSq4S22gNt8bKEbICcvCAac7hJUZ1rylThlrhsvrgA+DVkWU01r0niNZQ4UddlNw7g== + /@vue/runtime-core/3.0.4: + dependencies: + '@vue/reactivity': 3.0.4 + '@vue/shared': 3.0.4 + dev: false + resolution: + integrity: sha512-qH9e4kqU7b3u1JewvLmGmoAGY+mnuBqz7aEKb2mhpEgwa1yFv496BRuUfMXXMCix3+TndUVMJ8jt41FSdNppwg== /@vue/runtime-dom/3.0.3: dependencies: '@vue/runtime-core': 3.0.3 '@vue/shared': 3.0.3 csstype: 2.6.13 + dev: true resolution: integrity: sha512-ytTvSlRaEYvLQUkkpruIBizWIwuIeHER0Ch/evO6kUaPLjZjX3NerVxA40cqJx8rRjb9keQso21U2Jcpk8GsTg== + /@vue/runtime-dom/3.0.4: + dependencies: + '@vue/runtime-core': 3.0.4 + '@vue/shared': 3.0.4 + csstype: 2.6.13 + dev: false + resolution: + integrity: sha512-BGIoiTSESzWUhN0Ofi2X/q+HN8f6IUFmUEyyBGKbmx7DTAJNZhFfjqsepfXQrM5IGeTfJLB1ZEVyroDQJNXq3g== /@vue/shared/3.0.0-rc.10: dev: true resolution: integrity: sha512-fI6gVhhgb3cAmEkY4oeVVA2hWZ2xvkgogHdBI5PL7gSvZnOB6XZ2eQGsYjC4W+7BegvEkoMBuZsFXVa4ZQ07XQ== /@vue/shared/3.0.3: + dev: true resolution: integrity: sha512-yGgkF7u4W0Dmwri9XdeY50kOowN4UIX7aBQ///jbxx37itpzVjK7QzvD3ltQtPfWaJDGBfssGL0wpAgwX9OJpQ== - /@vuedx/analyze/0.2.3_vue@3.0.3: + /@vue/shared/3.0.4: + resolution: + integrity: sha512-Swfbz31AaMX48CpFl+YmIrqOH9MgJMTrltG9e26A4ZxYx9LjGuMV+41WnxFzS3Bc9nbrc6sDPM37G6nIT8NJSg== + /@vuedx/analyze/0.2.3_vue@3.0.4: dependencies: '@babel/code-frame': 7.10.4 '@babel/parser': 7.11.5 '@babel/traverse': 7.11.5 '@babel/types': 7.11.5 '@vue/compiler-core': 3.0.0-rc.10 - '@vue/compiler-sfc': 3.0.0-rc.10_vue@3.0.3 + '@vue/compiler-sfc': 3.0.0-rc.10_vue@3.0.4 cli-highlight: 2.1.4 commander: 6.1.0 fast-glob: 3.2.4 @@ -1899,12 +1954,12 @@ packages: dev: true resolution: integrity: sha512-ViWbGaFcNKvenYRaiDWqEGBBbOYQl15a6monHlGipZNTyW3Vk+/dIrxQvj3/WT+MBUIQboWrLHIooDCfSl5i9g== - /@vuedx/typescript-plugin-vue/0.2.3_vue@3.0.3: + /@vuedx/typescript-plugin-vue/0.2.3_vue@3.0.4: dependencies: '@vue/compiler-core': 3.0.0-rc.10 - '@vuedx/analyze': 0.2.3_vue@3.0.3 + '@vuedx/analyze': 0.2.3_vue@3.0.4 '@vuedx/template-ast-types': 0.2.3 - '@vuedx/vue-virtual-textdocument': 0.2.3_vue@3.0.3 + '@vuedx/vue-virtual-textdocument': 0.2.3_vue@3.0.4 de-indent: 1.0.2 quick-lru: 5.1.1 typescript: 3.9.7 @@ -1914,11 +1969,11 @@ packages: vue: '*' resolution: integrity: sha512-3P6DPnPv1JkGqUlOi/as9btiASJvPNyMT8WNRMZpAZI9eb7fj97c34N8oeLtNyI700CrnCiJvWUKZmJpRofAlQ== - /@vuedx/vue-virtual-textdocument/0.2.3_vue@3.0.3: + /@vuedx/vue-virtual-textdocument/0.2.3_vue@3.0.4: dependencies: '@vue/compiler-core': 3.0.0-rc.10 - '@vue/compiler-sfc': 3.0.0-rc.10_vue@3.0.3 - '@vuedx/analyze': 0.2.3_vue@3.0.3 + '@vue/compiler-sfc': 3.0.0-rc.10_vue@3.0.4 + '@vuedx/analyze': 0.2.3_vue@3.0.4 '@vuedx/compiler-tsx': 0.2.3 vscode-languageserver-textdocument: 1.0.1 vscode-uri: 2.1.2 @@ -1927,18 +1982,18 @@ packages: vue: '*' resolution: integrity: sha512-FcFd0S34Ffs3stb3E1zC0LYeJdLNsvKr0CqHMRkdCmHHlp9h4vYKFigBkzzPiT8G6pNyWGrniwi33o4CmKvedQ== - /@vueuse/core/4.0.0-rc.5_vue@3.0.3: + /@vueuse/core/4.0.0-rc.5_vue@3.0.4: dependencies: - '@vueuse/shared': 4.0.0-rc.5_vue@3.0.3 - vue-demi: 0.4.5_vue@3.0.3 + '@vueuse/shared': 4.0.0-rc.5_vue@3.0.4 + vue-demi: 0.4.5_vue@3.0.4 dev: false peerDependencies: vue: '*' resolution: integrity: sha512-Z1JAuaqpzt4VC6ftBCenCdkClRYr+yDQsDA9ybCnaKIrWR17OH8TORxM+TqGymwPvTXK33fxGfg3aCgtSHl0LA== - /@vueuse/shared/4.0.0-rc.5_vue@3.0.3: + /@vueuse/shared/4.0.0-rc.5_vue@3.0.4: dependencies: - vue-demi: 0.4.5_vue@3.0.3 + vue-demi: 0.4.5_vue@3.0.4 dev: false peerDependencies: vue: '*' @@ -6757,9 +6812,9 @@ packages: dev: true resolution: integrity: sha512-9IVhnZKhKPvbTtFDvl5jNkgUQ/ZKTQiDPvnEjBdOnkdXkOiW6thP1lqs09EZbECwR5eMKL0euCJVW5n9oUK50Q== - /vite-plugin-md/0.1.3_@vue+compiler-sfc@3.0.3: + /vite-plugin-md/0.1.3_@vue+compiler-sfc@3.0.4: dependencies: - '@vue/compiler-sfc': 3.0.3_vue@3.0.3 + '@vue/compiler-sfc': 3.0.4_vue@3.0.4 markdown-it: 12.0.2 dev: true peerDependencies: @@ -6784,6 +6839,19 @@ packages: dev: true resolution: integrity: sha512-S5Hc1x/rcfb6cgKjlW7yxSTv1er6fquzGZt/+xC1wavSBa7Qf6wdf6QzYiYdwmUom5yUSDEawc2gEYgq5SsZFg== + /vite-plugin-voie/0.4.1_07f5ea75858e841acd411b39e12d4e31: + dependencies: + fast-glob: 3.2.4 + vite: 1.0.0-rc.13 + voie-pages: 0.4.0_vue@3.0.4 + vue-router: 4.0.0-rc.6_vue@3.0.4 + dev: true + peerDependencies: + vite: ^1.0.0-rc.4 + vue: '*' + vue-router: ^4.0.0-beta.4 + resolution: + integrity: sha512-oGynRoj+CwQ4bcXPDDI9l18GgFl1yyjc8u3nmrDhMzWdu3EY8BTL9NLxA028tkbRGMvs/lUJJXnFzp//yApY2Q== /vite/1.0.0-rc.13: dependencies: '@babel/parser': 7.12.7 @@ -6847,9 +6915,9 @@ packages: hasBin: true resolution: integrity: sha512-hLfTbhNPDhwXMCAWR6s6C79G/O8Is0MbslglgoHSQsRby+KnqHgtHChCVBHFeV2oZBV/3xhHhnfm94BDPFe8Ww== - /voie-pages/0.4.0_vue@3.0.3: + /voie-pages/0.4.0_vue@3.0.4: dependencies: - vue-router: 4.0.0-rc.6_vue@3.0.3 + vue-router: 4.0.0-rc.6_vue@3.0.4 dev: true peerDependencies: vue: '*' @@ -6863,9 +6931,9 @@ packages: dev: true resolution: integrity: sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A== - /vue-demi/0.4.5_vue@3.0.3: + /vue-demi/0.4.5_vue@3.0.4: dependencies: - vue: 3.0.3 + vue: 3.0.4 dev: false hasBin: true peerDependencies: @@ -6889,10 +6957,10 @@ packages: eslint: '>=5.0.0' resolution: integrity: sha512-8FdXi0gieEwh1IprIBafpiJWcApwrU+l2FEj8c1HtHFdNXMd0+2jUSjBVmcQYohf/E72irwAXEXLga6TQcB3FA== - /vue-i18n/9.0.0-beta.8_vue@3.0.3: + /vue-i18n/9.0.0-beta.8_vue@3.0.4: dependencies: source-map: 0.6.1 - vue: 3.0.3 + vue: 3.0.4 dev: false engines: node: '>= 10' @@ -6900,9 +6968,9 @@ packages: vue: ^3.0.0 resolution: integrity: sha512-tViSN96jLi0AKvAVi4twcYYN5Ld++SqN1/140ua+YWm/iRbO2M0rAcsZ7e6/4LTm6Pd1ldSwWihSuv2bSQmlnw== - /vue-router/4.0.0-rc.6_vue@3.0.3: + /vue-router/4.0.0-rc.6_vue@3.0.4: dependencies: - vue: 3.0.3 + vue: 3.0.4 peerDependencies: vue: ^3.0.0 resolution: @@ -6912,8 +6980,17 @@ packages: '@vue/compiler-dom': 3.0.3 '@vue/runtime-dom': 3.0.3 '@vue/shared': 3.0.3 + dev: true resolution: integrity: sha512-BZG5meD5vLWdvfnRL5WqfDy+cnXO1X/SweModGUna78bdFPZW6+ZO1tU9p0acrskX3DKFcfSp2s4SZnMjABx6w== + /vue/3.0.4: + dependencies: + '@vue/compiler-dom': 3.0.4 + '@vue/runtime-dom': 3.0.4 + '@vue/shared': 3.0.4 + dev: false + resolution: + integrity: sha512-2o+AiQF8sAupyhbyl3oxVCl3WCwC/n5NI7VMM+gVQ231qvSB8eI7sCBloloqDJK6yA367EEtmRSeSCf4sxCC+A== /wcwidth/1.0.1: dependencies: defaults: 1.0.3 @@ -7211,7 +7288,7 @@ specifiers: '@purge-icons/generated': ^0.4.1 '@types/nprogress': ^0.2.0 '@typescript-eslint/eslint-plugin': ^4.9.0 - '@vue/compiler-sfc': ^3.0.3 + '@vue/compiler-sfc': ^3.0.4 '@vuedx/typescript-plugin-vue': ^0.2.3 '@vueuse/core': ^4.0.0-rc.5 autoprefixer: ^10.0.4 @@ -7229,8 +7306,8 @@ specifiers: vite-plugin-md: ^0.1.3 vite-plugin-purge-icons: ^0.4.5 vite-plugin-pwa: ^0.1.7 - vite-plugin-voie: 'npm:@knightly/vite-plugin-voie@pr11' + vite-plugin-voie: ^0.4.1 voie-pages: ^0.4.0 - vue: ^3.0.3 + vue: ^3.0.4 vue-i18n: 9.0.0-beta.8 vue-router: ^4.0.0-rc.6 diff --git a/src/main.ts b/src/main.ts index 37ab84a..9169905 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,4 +8,5 @@ const app = createApp(App) installPlugins(app) -app.mount('#app') +// true for hydrate +app.mount('#app', true) diff --git a/src/plugins/index.ts b/src/plugins/index.ts index e640371..938e74a 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -1,6 +1,7 @@ import { App } from 'vue' import installRouter from './router' import installI18n from './i18n' +import './icons' export default (app: App) => { installRouter(app)