Doesn't work with Vue/Nuxt
Rajan opened this issue · 3 comments
Rajan commented
vue.runtime.esm.js:472 [Vue warn]: Unknown custom element: <gh-btns-star> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <Pages/index.vue> at pages/index.vue
<Nuxt>
<Default> at layouts/default.vue
<Root>
Create a Nuxt.js Vue application and try to display stars button and it'll show this in the console.
gluons commented
OK. I'll look into it when I'm free.
gluons commented
I've tried it myself. I actually work.
Have you added this plugin into your Nuxt config?
plugins/vue-github-buttons.js
:
import Vue from 'vue';
import VueGitHubButtons from 'vue-github-buttons';
Vue.use(VueGitHubButtons);
import 'vue-github-buttons/dist/vue-github-buttons.css';
nuxt.config.js
:
module.exports = {
plugins: [
'~/plugins/vue-github-buttons'
]
};
gluons commented
v2.1.1
released.
Now, you don't need to write plugin by yourself anymore.
New version provides modules for easier using with Nuxt.