Nuxt.js: Missing merge strategy for head hook method

Created on 4 Sep 2018  路  5Comments  路  Source: nuxt/nuxt.js

Version

v1.4.2

Reproduction link

https://github.com/adrienbaron/vuetify-bug-theme-nuxt-i18n

Steps to reproduce

  • Create a Nuxt + Vuetify project
  • Update to Nuxt (1.4.2) and Vuetify 1.2.2
  • Add nuxt-i18n (5.2.1) to the project
  • Run the sample app

What is expected ?

  • Vuetify theme and Nuxt i18n meta should be added

What is actually happening?

  • Only Nuxt i18n meta is added

Additional comments?

This is also broken in Nuxt Edge.

I initially thought it was a bug in Vuetify 1.2.x and opened an issue there: https://github.com/vuetifyjs/vuetify/issues/5032.
It turns out that Nuxt is missing a merge strategy for the head hook.

Nuxt should probably declare this merge strategy to avoid those kind of conflicts:

Vue.config.optionMergeStrategies.head = Vue.config.optionMergeStrategies.data

This bug report is available on Nuxt community (#c7684)
bug-report

Most helpful comment

I think vue-meta does not support merging from mixins indeed, I am open for any help on improving vue-meta @adrienbaron

All 5 comments

@adrienbaron Could you add a PR for that? :relaxed:

Ok, so after trying to get this to work, I noticed that my fix actually breaks some behavior of Vue Meta (thank you unit tests ^^).
I wonder if this fix should not be in Vue Meta, but I just learned about it today so I'm not sure.
From reading their doc, it seems to already deal with merging info between parent and child components. Maybe they just don't support merging info from mixins?

I think vue-meta does not support merging from mixins indeed, I am open for any help on improving vue-meta @adrienbaron

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

surmon-china picture surmon-china  路  3Comments

shyamchandranmec picture shyamchandranmec  路  3Comments

vadimsg picture vadimsg  路  3Comments

bimohxh picture bimohxh  路  3Comments

msudgh picture msudgh  路  3Comments