[Feature Request] Make vue-meta keyName used by Vuetify configurable for when initVueMeta is called
See original GitHub issueProblem to solve
In the theme service, initVueMeta
emits a new Vue instance containing a head
property.
See: https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/services/theme/index.ts#L181
vue-meta defaults the keyName
to metaInfo
.
See: https://vue-meta.nuxtjs.org/api/#keyname
When using a metaInfo
property (the vue-meta default) to include meta info, during server side rendering the vuetify-theme-stylesheet
style is not included in the output causing a flash of unstyled content (FOUC).
Once rendered client side, the style tag is inserted into the DOM but initially no theme styles are applied.
Note: Nuxt.js is currently using a keyName
of head
, not the vue-meta default metaInfo
.
Proposed solution
Introduce a theme option to specify the vue-meta keyName
to use and add a disclaimer concerning the FOUC to the migration guide from v1 to indicate that the keyName
used for injecting the theme stylesheet was changed from metaInfo
to head
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:9 (4 by maintainers)
Top GitHub Comments
Related: https://github.com/vuetifyjs/vuetify/issues/9334
The problem is not only for Nuxt, i have same problem with vue-cli and vue-cli-vuetify-plugin.
Edit: The problem in vue-cli and vue-cli-vuetify-plugin is when you import Vue-Meta but never use the metaInfo function.
Nuxt version: 2.10.1 Vuetify version: 2.1.3
Encounter the same issue for the vuetify-theme-stylesheet missing in the head when using Nuxt. Further more all the <meta> tags are also missing after use the vuetify as a plugin.
But when I rollback to vuetify 2.0.11, everything works fine.