From 8d4e6882dbe441a1707605ae4b59d1df70ff2608 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sun, 30 Oct 2022 22:48:51 +0000 Subject: [PATCH] fix: handle some validation errors --- nuxt.config.ts | 22 ++- package.json | 9 +- pnpm-lock.yaml | 248 +++++++++++++++----------- src/app.vue | 1 + src/modules/components-chunk.ts | 4 + src/modules/runtime/spa-head-nitro.ts | 13 ++ src/modules/spa-head.ts | 24 +++ src/pages/index.vue | 2 +- 8 files changed, 207 insertions(+), 116 deletions(-) create mode 100644 src/modules/runtime/spa-head-nitro.ts create mode 100644 src/modules/spa-head.ts diff --git a/nuxt.config.ts b/nuxt.config.ts index 2658ff21..3b8b43ff 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,5 +1,3 @@ -import { useNuxt } from '@nuxt/kit' - export default defineNuxtConfig({ runtimeConfig: { // JWT claims @@ -70,7 +68,6 @@ export default defineNuxtConfig({ pageTransition: false, layoutTransition: false, head: { - htmlAttrs: { lang: 'en' }, meta: [ { name: 'msapplication-TileColor', content: '#1a202c' }, { name: 'theme-color', content: '#1a202c' }, @@ -144,20 +141,27 @@ export default defineNuxtConfig({ }, }, + htmlValidator: { + // failOnError: true, + options: { + rules: { + 'wcag/h37': 'warn', + 'element-required-attributes': 'warn', + 'attribute-empty-style': 'off', + }, + }, + }, + modules: [ 'magic-regexp/nuxt', '@nuxt/image-edge', - function () { - // Hotfix for tailwind - const nuxt = useNuxt() - // @ts-expect-error Nuxt 2 types - nuxt.options.watch = nuxt.options.watch || [] - }, + '@nuxtjs/html-validator', '@nuxtjs/tailwindcss', '@nuxtjs/color-mode', '@nuxt/content', 'nuxt-plausible', '@nuxtjs/fontaine', + '~/modules/spa-head', '~/modules/tree-shake', '~/modules/components-chunk', '~/modules/sitemap', diff --git a/package.json b/package.json index c75ea660..f5ba945c 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@nuxt/kit": "npm:@nuxt/kit-edge@3.0.0-rc.13-27781436.1f6b3be", "@nuxtjs/fontaine": "0.2.2", "gray-matter": "4.0.3", - "jose": "4.10.3", + "jose": "4.10.4", "nuxt-plausible": "0.1.1", "prism-themes": "1.9.0", "tslib": "2.4.0" @@ -39,11 +39,12 @@ "@nuxtjs/eslint-config": "11.0.0", "@nuxtjs/eslint-config-typescript": "11.0.0", "@nuxtjs/eslint-module": "3.1.0", - "@nuxtjs/tailwindcss": "6.1.1", + "@nuxtjs/html-validator": "^1.1.0", + "@nuxtjs/tailwindcss": "6.1.2", "@playwright/test": "1.27.1", - "@types/node": "18.11.7", + "@types/node": "18.11.8", "@vitejs/plugin-vue": "3.2.0", - "@vue/test-utils": "2.2.0", + "@vue/test-utils": "2.2.1", "c8": "7.12.0", "eslint": "8.26.0", "eslint-config-prettier": "8.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 79d266ba..09ba3a43 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,11 +14,12 @@ specifiers: '@nuxtjs/eslint-config-typescript': 11.0.0 '@nuxtjs/eslint-module': 3.1.0 '@nuxtjs/fontaine': 0.2.2 - '@nuxtjs/tailwindcss': 6.1.1 + '@nuxtjs/html-validator': ^1.1.0 + '@nuxtjs/tailwindcss': 6.1.2 '@playwright/test': 1.27.1 - '@types/node': 18.11.7 + '@types/node': 18.11.8 '@vitejs/plugin-vue': 3.2.0 - '@vue/test-utils': 2.2.0 + '@vue/test-utils': 2.2.1 c8: 7.12.0 eslint: 8.26.0 eslint-config-prettier: 8.5.0 @@ -27,7 +28,7 @@ specifiers: gray-matter: 4.0.3 happy-dom: 7.6.6 husky: 8.0.1 - jose: 4.10.3 + jose: 4.10.4 lint-staged: 13.0.3 magic-regexp: 0.6.0 nuxt: npm:nuxt3@3.0.0-rc.13-27781436.1f6b3be @@ -48,8 +49,9 @@ dependencies: '@nuxt/image-edge': 1.0.0-27769790.4b27db3 '@nuxt/kit': /@nuxt/kit-edge/3.0.0-rc.13-27781436.1f6b3be '@nuxtjs/fontaine': 0.2.2 + '@nuxtjs/html-validator': 1.1.0 gray-matter: 4.0.3 - jose: 4.10.3 + jose: 4.10.4 nuxt-plausible: 0.1.1 prism-themes: 1.9.0 tslib: 2.4.0 @@ -61,11 +63,11 @@ devDependencies: '@nuxtjs/eslint-config': 11.0.0_eslint@8.26.0 '@nuxtjs/eslint-config-typescript': 11.0.0_eslint@8.26.0 '@nuxtjs/eslint-module': 3.1.0_eslint@8.26.0 - '@nuxtjs/tailwindcss': 6.1.1 + '@nuxtjs/tailwindcss': 6.1.2 '@playwright/test': 1.27.1 - '@types/node': 18.11.7 + '@types/node': 18.11.8 '@vitejs/plugin-vue': 3.2.0 - '@vue/test-utils': 2.2.0 + '@vue/test-utils': 2.2.1 c8: 7.12.0 eslint: 8.26.0 eslint-config-prettier: 8.5.0_eslint@8.26.0 @@ -600,6 +602,13 @@ packages: - supports-color dev: true + /@html-validate/stylish/3.0.1: + resolution: {integrity: sha512-jQNDrSnWvJEPSlqC1tFqcbmVuJy2x61UwqFsXHxYT2sgCXFW4AVhsoIcHkECCmUHtQ8hpHU6yOBGA+rMLZhS7A==} + engines: {node: '>= 14.0'} + dependencies: + kleur: 4.1.5 + dev: false + /@humanwhocodes/config-array/0.11.6: resolution: {integrity: sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==} engines: {node: '>=10.10.0'} @@ -905,7 +914,7 @@ packages: /@nuxt/postcss8/1.1.3: resolution: {integrity: sha512-CdHtErhvQwueNZPBOmlAAKrNCK7aIpZDYhtS7TzXlSgPHHox1g3cSlf+Ke9oB/8t4mNNjdB+prclme2ibuCOEA==} dependencies: - autoprefixer: 10.4.12_postcss@8.4.18 + autoprefixer: 10.4.13_postcss@8.4.18 css-loader: 5.2.7 defu: 3.2.2 postcss: 8.4.18 @@ -967,7 +976,7 @@ packages: defu: 6.1.0 jiti: 1.16.0 pathe: 0.3.9 - pkg-types: 0.3.6 + pkg-types: 0.3.5 postcss-import-resolver: 2.0.0 scule: 0.3.2 std-env: 3.3.0 @@ -1038,7 +1047,7 @@ packages: '@vitejs/plugin-vue-jsx': 2.1.0_vite@3.2.1+vue@3.2.41 autoprefixer: 10.4.13_postcss@8.4.18 chokidar: 3.5.3 - cssnano: 5.1.13_postcss@8.4.18 + cssnano: 5.1.14_postcss@8.4.18 defu: 6.1.0 esbuild: 0.15.12 escape-string-regexp: 5.0.0 @@ -1172,22 +1181,36 @@ packages: - supports-color dev: false - /@nuxtjs/tailwindcss/6.1.1: - resolution: {integrity: sha512-8yrGk2y7IUAMOW3+b0S/nWQmyZXtLge7pYYDXfiEhU4voL7zMoMdtp+ovmUr5LvTuEn3w5zCDczaBexvy0nmDw==} + /@nuxtjs/html-validator/1.1.0: + resolution: {integrity: sha512-g4SvV0JtbX6RMYV+aLpfQoPKr1s3ODfDILkvn42Xn4B9Bnsz7/DrhWxKMaYIeTT607iiv3PA3lgfmOf7Dw1WaQ==} + dependencies: + '@nuxt/kit': 3.0.0-rc.12 + chalk: 5.1.2 + html-validate: 7.6.0 + prettier: 2.7.1 + transitivePeerDependencies: + - jest + - jest-diff + - jest-snapshot + - supports-color + dev: false + + /@nuxtjs/tailwindcss/6.1.2: + resolution: {integrity: sha512-cIyqbyvceZS9DGiDYwwBlUS7vB6gOlBnvQ2QAAvrL2VzK0MA4AH2yaqCLJuHrzvLUp1v3uRw22KLvY6w2t8pCQ==} dependencies: '@nuxt/kit': 3.0.0-rc.12 '@nuxt/postcss8': 1.1.3 - autoprefixer: 10.4.12_postcss@8.4.18 + autoprefixer: 10.4.13_postcss@8.4.18 chalk: 5.1.2 clear-module: 4.1.2 consola: 2.15.3 defu: 6.1.0 - h3: 0.8.5 + h3: 0.8.6 postcss: 8.4.18 postcss-custom-properties: 12.1.10_postcss@8.4.18 postcss-nesting: 10.2.0_postcss@8.4.18 - tailwind-config-viewer: 1.7.2_tailwindcss@3.2.0 - tailwindcss: 3.2.0 + tailwind-config-viewer: 1.7.2_tailwindcss@3.2.1 + tailwindcss: 3.2.1 ufo: 0.8.6 transitivePeerDependencies: - supports-color @@ -1354,6 +1377,17 @@ packages: rollup: 2.79.1 dev: true + /@sidvind/better-ajv-errors/2.1.0_ajv@8.11.0: + resolution: {integrity: sha512-JuIb009FhHuL9priFBho2kv7QmZOydj0LgYvj+h1t0mMCmhM/YmQNRlJR5wVtBZya6wrVFK5Hi5TIbv5BKEx7w==} + engines: {node: '>= 14.0.0'} + peerDependencies: + ajv: 4.11.8 - 8 + dependencies: + '@babel/code-frame': 7.18.6 + ajv: 8.11.0 + chalk: 4.1.2 + dev: false + /@socket.io/component-emitter/3.1.0: resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==} dev: false @@ -1459,6 +1493,10 @@ packages: resolution: {integrity: sha512-LhFTglglr63mNXUSRYD8A+ZAIu5sFqNJ4Y2fPuY7UlrySJH87rRRlhtVmMHplmfk5WkoJGmDjE9oiTfyX94CpQ==} dev: true + /@types/node/18.11.8: + resolution: {integrity: sha512-uGwPWlE0Hj972KkHtCDVwZ8O39GmyjfMane1Z3GUBGGnkZ2USDq7SxLpVIiIHpweY9DS0QTDH0Nw7RNBsAAZ5A==} + dev: true + /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true @@ -1768,8 +1806,8 @@ packages: resolution: {integrity: sha512-W9mfWLHmJhkfAmV+7gDjcHeAWALQtgGT3JErxULl0oz6R6+3ug91I7IErs93eCFhPCZPHBs4QJS7YWEV7A3sxw==} dev: true - /@vue/test-utils/2.2.0: - resolution: {integrity: sha512-EKp5/N7ieNZdoLTkD16j/irUjIEDN63QUIc41vLUMqGvSsTQN0QxbFiQqh5v49RPfS5vZH+DhjNUEkijCMOCSg==} + /@vue/test-utils/2.2.1: + resolution: {integrity: sha512-AkLt24wnnxedJ3NX090JYiueog184QqlR5TVNZM+lggCrK8XjeuPr274okaLqDmiRgp4XVCaGa07KqKLGQbsMQ==} peerDependencies: vue: ^3.0.1 dev: true @@ -1838,7 +1876,6 @@ packages: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: acorn: 8.8.1 - dev: true /acorn-node/1.8.2: resolution: {integrity: sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==} @@ -1856,7 +1893,6 @@ packages: /acorn-walk/8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} - dev: true /acorn/7.4.1: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} @@ -1910,7 +1946,6 @@ packages: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 uri-js: 4.4.1 - dev: true /ansi-escapes/4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} @@ -1947,7 +1982,6 @@ packages: engines: {node: '>=8'} dependencies: color-convert: 2.0.1 - dev: true /ansi-styles/6.2.1: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} @@ -2098,22 +2132,6 @@ packages: engines: {node: '>= 4.0.0'} dev: true - /autoprefixer/10.4.12_postcss@8.4.18: - resolution: {integrity: sha512-WrCGV9/b97Pa+jtwf5UGaRjgQIg7OK3D06GnoYoZNcG1Xb8Gt3EfuKjlhh9i/VtT16g6PYjZ69jdJ2g8FxSC4Q==} - engines: {node: ^10 || ^12 || >=14} - hasBin: true - peerDependencies: - postcss: ^8.1.0 - dependencies: - browserslist: 4.21.4 - caniuse-lite: 1.0.30001422 - fraction.js: 4.2.0 - normalize-range: 0.1.2 - picocolors: 1.0.0 - postcss: 8.4.18 - postcss-value-parser: 4.2.0 - dev: true - /autoprefixer/10.4.13_postcss@8.4.18: resolution: {integrity: sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg==} engines: {node: ^10 || ^12 || >=14} @@ -2122,7 +2140,7 @@ packages: postcss: ^8.1.0 dependencies: browserslist: 4.21.4 - caniuse-lite: 1.0.30001426 + caniuse-lite: 1.0.30001427 fraction.js: 4.2.0 normalize-range: 0.1.2 picocolors: 1.0.0 @@ -2141,7 +2159,6 @@ packages: /balanced-match/1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true /balanced-match/2.0.0: resolution: {integrity: sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==} @@ -2198,7 +2215,6 @@ packages: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} dependencies: balanced-match: 1.0.2 - dev: true /braces/3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} @@ -2217,7 +2233,7 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001426 + caniuse-lite: 1.0.30001427 electron-to-chromium: 1.4.284 node-releases: 2.0.6 update-browserslist-db: 1.0.10_browserslist@4.21.4 @@ -2269,7 +2285,7 @@ packages: jiti: 1.16.0 mlly: 0.5.16 pathe: 0.3.9 - pkg-types: 0.3.6 + pkg-types: 0.3.5 rc9: 1.2.2 /c8/7.12.0: @@ -2338,17 +2354,13 @@ packages: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} dependencies: browserslist: 4.21.4 - caniuse-lite: 1.0.30001426 + caniuse-lite: 1.0.30001427 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 dev: true - /caniuse-lite/1.0.30001422: - resolution: {integrity: sha512-hSesn02u1QacQHhaxl/kNMZwqVG35Sz/8DgvmgedxSH8z9UUpcDYSPYgsj3x5dQNRcNp6BwpSfQfVzYUTm+fog==} - dev: true - - /caniuse-lite/1.0.30001426: - resolution: {integrity: sha512-n7cosrHLl8AWt0wwZw/PJZgUg3lV0gk9LMI7ikGJwhyhgsd2Nb65vKvmSexCqq/J7rbH3mFG6yZZiPR5dLPW5A==} + /caniuse-lite/1.0.30001427: + resolution: {integrity: sha512-lfXQ73oB9c8DP5Suxaszm+Ta2sr/4tf8+381GkIm1MLj/YdLf+rEDyDSRCzeltuyTVGm+/s18gdZ0q+Wmp8VsQ==} /caseless/0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -2385,12 +2397,10 @@ packages: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - dev: true /chalk/5.1.2: resolution: {integrity: sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - dev: true /character-entities-html4/2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} @@ -2860,8 +2870,8 @@ packages: dev: false optional: true - /cssnano-preset-default/5.2.12_postcss@8.4.18: - resolution: {integrity: sha512-OyCBTZi+PXgylz9HAA5kHyoYhfGcYdwFmyaJzWnzxuGRtnMw/kR6ilW9XzlzlRAtB6PLT/r+prYgkef7hngFew==} + /cssnano-preset-default/5.2.13_postcss@8.4.18: + resolution: {integrity: sha512-PX7sQ4Pb+UtOWuz8A1d+Rbi+WimBIxJTRyBdgGp1J75VU0r/HFQeLnMYgHiCAp6AR4rqrc7Y4R+1Rjk3KJz6DQ==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 @@ -2871,16 +2881,16 @@ packages: postcss: 8.4.18 postcss-calc: 8.2.4_postcss@8.4.18 postcss-colormin: 5.3.0_postcss@8.4.18 - postcss-convert-values: 5.1.2_postcss@8.4.18 + postcss-convert-values: 5.1.3_postcss@8.4.18 postcss-discard-comments: 5.1.2_postcss@8.4.18 postcss-discard-duplicates: 5.1.0_postcss@8.4.18 postcss-discard-empty: 5.1.1_postcss@8.4.18 postcss-discard-overridden: 5.1.0_postcss@8.4.18 - postcss-merge-longhand: 5.1.6_postcss@8.4.18 - postcss-merge-rules: 5.1.2_postcss@8.4.18 + postcss-merge-longhand: 5.1.7_postcss@8.4.18 + postcss-merge-rules: 5.1.3_postcss@8.4.18 postcss-minify-font-values: 5.1.0_postcss@8.4.18 postcss-minify-gradients: 5.1.1_postcss@8.4.18 - postcss-minify-params: 5.1.3_postcss@8.4.18 + postcss-minify-params: 5.1.4_postcss@8.4.18 postcss-minify-selectors: 5.2.1_postcss@8.4.18 postcss-normalize-charset: 5.1.0_postcss@8.4.18 postcss-normalize-display-values: 5.1.0_postcss@8.4.18 @@ -2888,11 +2898,11 @@ packages: postcss-normalize-repeat-style: 5.1.1_postcss@8.4.18 postcss-normalize-string: 5.1.0_postcss@8.4.18 postcss-normalize-timing-functions: 5.1.0_postcss@8.4.18 - postcss-normalize-unicode: 5.1.0_postcss@8.4.18 + postcss-normalize-unicode: 5.1.1_postcss@8.4.18 postcss-normalize-url: 5.1.0_postcss@8.4.18 postcss-normalize-whitespace: 5.1.1_postcss@8.4.18 postcss-ordered-values: 5.1.3_postcss@8.4.18 - postcss-reduce-initial: 5.1.0_postcss@8.4.18 + postcss-reduce-initial: 5.1.1_postcss@8.4.18 postcss-reduce-transforms: 5.1.0_postcss@8.4.18 postcss-svgo: 5.1.0_postcss@8.4.18 postcss-unique-selectors: 5.1.1_postcss@8.4.18 @@ -2907,13 +2917,13 @@ packages: postcss: 8.4.18 dev: true - /cssnano/5.1.13_postcss@8.4.18: - resolution: {integrity: sha512-S2SL2ekdEz6w6a2epXn4CmMKU4K3KpcyXLKfAYc9UQQqJRkD/2eLUG0vJ3Db/9OvO5GuAdgXw3pFbR6abqghDQ==} + /cssnano/5.1.14_postcss@8.4.18: + resolution: {integrity: sha512-Oou7ihiTocbKqi0J1bB+TRJIQX5RMR3JghA8hcWSw9mjBLQ5Y3RWqEDoYG3sRNlAbCIXpqMoZGbq5KDR3vdzgw==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - cssnano-preset-default: 5.2.12_postcss@8.4.18 + cssnano-preset-default: 5.2.13_postcss@8.4.18 lilconfig: 2.0.6 postcss: 8.4.18 yaml: 1.10.2 @@ -3048,7 +3058,6 @@ packages: /deepmerge/4.2.2: resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} engines: {node: '>=0.10.0'} - dev: true /defaults/1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} @@ -3252,7 +3261,7 @@ packages: dev: true /ee-first/1.1.1: - resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} dev: true /electron-to-chromium/1.4.284: @@ -4007,7 +4016,6 @@ packages: /eslint-visitor-keys/3.3.0: resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true /eslint-webpack-plugin/2.7.0_eslint@8.26.0: resolution: {integrity: sha512-bNaVVUvU4srexGhVcayn/F4pJAz19CWBkKoMx7aSQ4wtTbZQCnG5O9LHCE42mM+JSKOUp7n6vd5CIwzj7lOVGA==} @@ -4080,7 +4088,6 @@ packages: acorn: 8.8.1 acorn-jsx: 5.3.2_acorn@8.8.1 eslint-visitor-keys: 3.3.0 - dev: true /esprima/4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -4201,7 +4208,6 @@ packages: /fast-deep-equal/3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - dev: true /fast-diff/1.2.0: resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} @@ -4417,7 +4423,6 @@ packages: /fs.realpath/1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true /fsevents/2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} @@ -4580,7 +4585,6 @@ packages: inherits: 2.0.4 minimatch: 5.1.0 once: 1.4.0 - dev: true /global-dirs/0.1.1: resolution: {integrity: sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==} @@ -4681,6 +4685,7 @@ packages: destr: 1.2.0 radix3: 0.2.1 ufo: 0.8.6 + dev: false /h3/0.8.6: resolution: {integrity: sha512-CSWNOKa3QGo67rFU2PhbFTp0uPJtilNji2Z0pMiSRQt3+OkIW0u3E1WMJqIycLqaTgb9JyFqH/S4mcTyyGtvyQ==} @@ -4719,7 +4724,6 @@ packages: /has-flag/4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - dev: true /has-property-descriptors/1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} @@ -4868,6 +4872,37 @@ packages: resolution: {integrity: sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg==} engines: {node: '>=8'} + /html-validate/7.6.0: + resolution: {integrity: sha512-6Ib433N0/ou2/0oLjfUmFjaAVFW8KKU/fOBBhrZXNuPcYCUsZExAD3xOqKl1bp5ANHb4PItXEK9vcKL/L7Da0Q==} + engines: {node: '>= 14.0'} + hasBin: true + peerDependencies: + jest: ^25.1 || ^26 || ^27.1 || ^28.1.3 || ^29.0.3 + jest-diff: ^25.1 || ^26 || ^27.1 || ^28.1.3 || ^29.0.3 + jest-snapshot: ^25.1 || ^26 || ^27.1 || ^28.1.3 || ^29.0.3 + peerDependenciesMeta: + jest: + optional: true + jest-diff: + optional: true + jest-snapshot: + optional: true + dependencies: + '@babel/code-frame': 7.18.6 + '@html-validate/stylish': 3.0.1 + '@sidvind/better-ajv-errors': 2.1.0_ajv@8.11.0 + acorn-walk: 8.2.0 + ajv: 8.11.0 + deepmerge: 4.2.2 + espree: 9.4.0 + glob: 8.0.3 + ignore: 5.2.0 + kleur: 4.1.5 + minimist: 1.2.7 + prompts: 2.4.2 + semver: 7.3.8 + dev: false + /html-void-elements/2.0.1: resolution: {integrity: sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==} dev: false @@ -5040,7 +5075,6 @@ packages: dependencies: once: 1.4.0 wrappy: 1.0.2 - dev: true /inherits/2.0.3: resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} @@ -5469,8 +5503,8 @@ packages: resolution: {integrity: sha512-L3BJStEf5NAqNuzrpfbN71dp43mYIcBUlCRea/vdyv5dW/AYa1d4bpelko4SHdY3I6eN9Wzyasxirj1/vv5kmg==} hasBin: true - /jose/4.10.3: - resolution: {integrity: sha512-3S4wQnaoJKSAx9uHSoyf8B/lxjs1qCntHWL6wNFszJazo+FtWe+qD0zVfY0BlqJ5HHK4jcnM98k3BQzVLbzE4g==} + /jose/4.10.4: + resolution: {integrity: sha512-eBH77Xs9Yc/oTDvukhAEDVMijhekPuNktXJL4tUlB22jqKP1k48v5nmsUmc8feoJPsxB3HsfEt2LbVSoz+1mng==} dev: false /js-sdsl/4.1.5: @@ -5513,7 +5547,6 @@ packages: /json-schema-traverse/1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - dev: true /json-stable-stringify-without-jsonify/1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} @@ -5558,6 +5591,11 @@ packages: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} + /kleur/3.0.3: + resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} + engines: {node: '>=6'} + dev: false + /kleur/4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} @@ -6438,7 +6476,6 @@ packages: engines: {node: '>=10'} dependencies: brace-expansion: 2.0.1 - dev: true /minimist-options/4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} @@ -7155,7 +7192,6 @@ packages: jsonc-parser: 3.2.0 mlly: 0.5.16 pathe: 0.3.9 - dev: false /pkg-types/0.3.6: resolution: {integrity: sha512-uQZutkkh6axl1GxDm5/+8ivVdwuJ5pyDGqJeSiIWIUWIqYiK3p9QKozN/Rv6eVvFoeSWkN1uoYeSDBwwBJBtbg==} @@ -7223,8 +7259,8 @@ packages: postcss-value-parser: 4.2.0 dev: true - /postcss-convert-values/5.1.2_postcss@8.4.18: - resolution: {integrity: sha512-c6Hzc4GAv95B7suy4udszX9Zy4ETyMCgFPUDtWjdFTKH1SE9eFY/jEpHSwTH1QPuwxHpWslhckUQWbNRM4ho5g==} + /postcss-convert-values/5.1.3_postcss@8.4.18: + resolution: {integrity: sha512-82pC1xkJZtcJEfiLw6UXnXVXScgtBrjlO5CBmuDQc+dlb88ZYheFsjTn40+zBVi3DkfF7iezO0nJUPLcJK3pvA==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 @@ -7377,19 +7413,19 @@ packages: resolution: {integrity: sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==} dev: true - /postcss-merge-longhand/5.1.6_postcss@8.4.18: - resolution: {integrity: sha512-6C/UGF/3T5OE2CEbOuX7iNO63dnvqhGZeUnKkDeifebY0XqkkvrctYSZurpNE902LDf2yKwwPFgotnfSoPhQiw==} + /postcss-merge-longhand/5.1.7_postcss@8.4.18: + resolution: {integrity: sha512-YCI9gZB+PLNskrK0BB3/2OzPnGhPkBEwmwhfYk1ilBHYVAZB7/tkTHFBAnCrvBBOmeYyMYw3DMjT55SyxMBzjQ==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: postcss: 8.4.18 postcss-value-parser: 4.2.0 - stylehacks: 5.1.0_postcss@8.4.18 + stylehacks: 5.1.1_postcss@8.4.18 dev: true - /postcss-merge-rules/5.1.2_postcss@8.4.18: - resolution: {integrity: sha512-zKMUlnw+zYCWoPN6yhPjtcEdlJaMUZ0WyVcxTAmw3lkkN/NDMRkOkiuctQEoWAOvH7twaxUUdvBWl0d4+hifRQ==} + /postcss-merge-rules/5.1.3_postcss@8.4.18: + resolution: {integrity: sha512-LbLd7uFC00vpOuMvyZop8+vvhnfRGpp2S+IMQKeuOZZapPRY4SMq5ErjQeHbHsjCUgJkRNrlU+LmxsKIqPKQlA==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 @@ -7423,8 +7459,8 @@ packages: postcss-value-parser: 4.2.0 dev: true - /postcss-minify-params/5.1.3_postcss@8.4.18: - resolution: {integrity: sha512-bkzpWcjykkqIujNL+EVEPOlLYi/eZ050oImVtHU7b4lFS82jPnsCb44gvC6pxaNt38Els3jWYDHTjHKf0koTgg==} + /postcss-minify-params/5.1.4_postcss@8.4.18: + resolution: {integrity: sha512-+mePA3MgdmVmv6g+30rn57USjOGSAyuxUmkfiWpzalZ8aiBkdPYjXWtHuwJGm1v5Ojy0Z0LaSYhHaLJQB0P8Jw==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 @@ -7566,8 +7602,8 @@ packages: postcss-value-parser: 4.2.0 dev: true - /postcss-normalize-unicode/5.1.0_postcss@8.4.18: - resolution: {integrity: sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ==} + /postcss-normalize-unicode/5.1.1_postcss@8.4.18: + resolution: {integrity: sha512-qnCL5jzkNUmKVhZoENp1mJiGNPcsJCs1aaRmURmeJGES23Z/ajaln+EPTD+rBeNkSryI+2WTdW+lwcVdOikrpA==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 @@ -7609,8 +7645,8 @@ packages: postcss-value-parser: 4.2.0 dev: true - /postcss-reduce-initial/5.1.0_postcss@8.4.18: - resolution: {integrity: sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw==} + /postcss-reduce-initial/5.1.1_postcss@8.4.18: + resolution: {integrity: sha512-//jeDqWcHPuXGZLoolFrUXBDyuEGbr9S2rMo19bkTIjBQ4PqkaO+oI8wua5BOUxpfi97i3PCoInsiFIEBfkm9w==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 @@ -7752,7 +7788,6 @@ packages: resolution: {integrity: sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==} engines: {node: '>=10.13.0'} hasBin: true - dev: true /pretty-bytes/6.0.0: resolution: {integrity: sha512-6UqkYefdogmzqAZWzJ7laYeJnaXDy2/J+ZqiiMtS7t7OfpXWTlaeGMwX8U6EFvPV/YWWEKRkS8hKS4k60WHTOg==} @@ -7772,6 +7807,14 @@ packages: asap: 2.0.6 dev: true + /prompts/2.4.2: + resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} + engines: {node: '>= 6'} + dependencies: + kleur: 3.0.3 + sisteransi: 1.0.5 + dev: false + /property-information/6.1.1: resolution: {integrity: sha512-hrzC564QIl0r0vy4l6MvRLhafmUowhO/O3KgVSoXIbbA2Sz4j8HGpJc6T2cubRVwMwpdiG/vKGfhT4IixmKN9w==} dev: false @@ -7794,7 +7837,6 @@ packages: /punycode/2.1.1: resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} engines: {node: '>=6'} - dev: true /q/1.5.1: resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} @@ -8079,7 +8121,6 @@ packages: /require-from-string/2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - dev: true /requires-port/1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} @@ -8420,6 +8461,10 @@ packages: dev: false optional: true + /sisteransi/1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + dev: false + /slash/3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -8690,8 +8735,8 @@ packages: inline-style-parser: 0.1.1 dev: false - /stylehacks/5.1.0_postcss@8.4.18: - resolution: {integrity: sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q==} + /stylehacks/5.1.1_postcss@8.4.18: + resolution: {integrity: sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 @@ -8811,7 +8856,6 @@ packages: engines: {node: '>=8'} dependencies: has-flag: 4.0.0 - dev: true /supports-color/8.1.1: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} @@ -8885,7 +8929,7 @@ packages: strip-ansi: 6.0.1 dev: true - /tailwind-config-viewer/1.7.2_tailwindcss@3.2.0: + /tailwind-config-viewer/1.7.2_tailwindcss@3.2.1: resolution: {integrity: sha512-3JJCeAAlvG+i/EBj+tQb0x4weo30QjdSAo4hlcnVbtD+CkpzHi/UwU9InbPMcYH+ESActoa2kCyjpLEyjEkn0Q==} engines: {node: '>=8'} hasBin: true @@ -8900,13 +8944,13 @@ packages: open: 7.4.2 portfinder: 1.0.32 replace-in-file: 6.3.5 - tailwindcss: 3.2.0 + tailwindcss: 3.2.1 transitivePeerDependencies: - supports-color dev: true - /tailwindcss/3.2.0: - resolution: {integrity: sha512-ARh/W0uH5UlWIC2nn02V0+5fyF0k6qZliyt4QYic2upOhPUE/Spu1EURNc9txJ3+4j8OEmdigqfDpw4d2tA4vA==} + /tailwindcss/3.2.1: + resolution: {integrity: sha512-Uw+GVSxp5CM48krnjHObqoOwlCt5Qo6nw1jlCRwfGy68dSYb/LwS9ZFidYGRiM+w6rMawkZiu1mEMAsHYAfoLg==} engines: {node: '>=12.13.0'} hasBin: true dependencies: @@ -8920,6 +8964,7 @@ packages: glob-parent: 6.0.2 is-glob: 4.0.3 lilconfig: 2.0.6 + micromatch: 4.0.5 normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 @@ -9471,7 +9516,6 @@ packages: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.1.1 - dev: true /util-deprecate/1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} diff --git a/src/app.vue b/src/app.vue index f192b5e3..a90f37fa 100644 --- a/src/app.vue +++ b/src/app.vue @@ -19,6 +19,7 @@ const { path = '/' } = route.fullPath.match(PATH_RE)?.groups ?? {} const url = `https://roe.dev${path}` useHead({ + htmlAttrs: { lang: 'en' }, meta: [{ property: 'og:url', content: url }], link: [{ rel: 'canonical', href: url }], }) diff --git a/src/modules/components-chunk.ts b/src/modules/components-chunk.ts index 8f7c6754..493ee1c2 100644 --- a/src/modules/components-chunk.ts +++ b/src/modules/components-chunk.ts @@ -16,6 +16,7 @@ export default defineNuxtModule({ 'ContentRendererMarkdown', 'ProseP', 'ProseA', + 'ProseH2', 'ProseH3', 'ProseLi', 'ProseOl', @@ -50,6 +51,9 @@ export default defineNuxtModule({ // Use single components chunk nuxt.hook('vite:extendConfig', (config, { isServer }) => { + config.build ||= {} + config.build.rollupOptions ||= {} + config.build.rollupOptions.output ||= {} if (Array.isArray(config.build.rollupOptions.output) || isServer) return config.build.rollupOptions.output.manualChunks = id => { if ( diff --git a/src/modules/runtime/spa-head-nitro.ts b/src/modules/runtime/spa-head-nitro.ts new file mode 100644 index 00000000..8478d91c --- /dev/null +++ b/src/modules/runtime/spa-head-nitro.ts @@ -0,0 +1,13 @@ +import head from '#spa-head' + +export default defineNitroPlugin(nitro => { + nitro.hooks.hook('render:html', htmlContext => { + if (!htmlContext.htmlAttrs.length) { + htmlContext.htmlAttrs.push(head.htmlAttrs, ' lang="en"') + htmlContext.head.push(...(head.headTags || [])) + htmlContext.bodyAttrs.push(head.bodyAttrs) + htmlContext.bodyPreprend.push(...(head.bodyScriptsPrepend || [])) + htmlContext.bodyAppend.push(...(head.bodyScripts || [])) + } + }) +}) diff --git a/src/modules/spa-head.ts b/src/modules/spa-head.ts new file mode 100644 index 00000000..926b365d --- /dev/null +++ b/src/modules/spa-head.ts @@ -0,0 +1,24 @@ +import { fileURLToPath } from 'url' +import { defineNuxtModule, useNuxt } from '@nuxt/kit' +import { createHead, renderHeadToString } from '@vueuse/head' + +export default defineNuxtModule({ + meta: { + name: 'spa-head', + }, + setup () { + const nuxt = useNuxt() + nuxt.hook('nitro:config', async config => { + // Add head chunk for SPA renders + const head = createHead(nuxt.options.app.head) + const headChunk = await renderHeadToString(head) + config.virtual!['#spa-head'] = `export default ${JSON.stringify( + headChunk + )}` + config.plugins ||= [] + config.plugins.push( + fileURLToPath(new URL('./runtime/spa-head-nitro.ts', import.meta.url)) + ) + }) + }, +}) diff --git a/src/pages/index.vue b/src/pages/index.vue index 43e93269..e5128627 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -5,7 +5,7 @@
-