question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Make vue-meta keyName used by Vuetify configurable for when initVueMeta is called

See original GitHub issue

Problem 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:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MrJmpl3commented, Oct 21, 2019

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.

1reaction
brooklynb7commented, Oct 13, 2019

Vuetify Theming is indeed for now buggy with Nuxt / Vue-meta for Single Page Applications (SPA)

In current v2.1.1, options of customProperties are not seem to work in except SSR mode. I examined it happens since v2.0.12. Is it relating with this issues ?

thanks

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Presets — Vuetify
Plugin development guide. A Vuetify preset is a npm package that provides framework wide options and custom styling using Vue CLI. It consists ......
Read more >
Theme configuration — Vuetify
Theme generator. Discover and generate new color themes for your Vuetify applications using our Theme Generator tool.
Read more >
Treeshaking — Vuetify
Vuetify is a Material Design component framework for Vue.js. It aims to provide all the tools necessary to create beautiful content rich ...
Read more >
Frequently asked questions — Vuetify
Vuetify is a Material Design component framework for Vue.js. It aims to provide all the tools necessary to create beautiful content rich ...
Read more >
Contributing — Vuetify
Vuetify is a Material Design component framework for Vue.js. It aims to provide all the tools necessary to create beautiful content rich applications....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found