universal-vue / uvue

Vue CLI plugin to create universal Vue applications with ease
https://universal-vue.github.io/docs/
MIT License
127 stars 13 forks source link

Support vue-meta 2.0 #35

Closed academici closed 5 years ago

academici commented 5 years ago

After upgrade vue-meta@2.0.0-rc.2 get an error "Cannot read property 'bodyAttrs' of undefined"

            if (typeof context.bodyAdd === 'string') {
                body += context.bodyAdd;
            }
            if (context.meta) {
                const metas = context.meta.inject();
                bodyAttrs += metas.bodyAttrs.text();
                htmlAttrs += metas.htmlAttrs.text();
                head =
                    metas.meta.text() +
                        metas.title.text() +
                        metas.link.text() +
yabab-dev commented 5 years ago

I've tested UVue against vue-meta@v2.0.2 and it seems to works.

Maybe try to update it ?

academici commented 5 years ago

yes, problem solved

ilajosmanov commented 4 years ago

It does not work with vue-meta@2.3.2

yabab-dev commented 4 years ago

@ilajosmanov I only see 2.3.1 for the latest version of vue-meta, and it does work on my side