Bonne pratique register components

Bonjour, je suis nouveau sur vue js :slight_smile:

J’utilise vue js avec nuxt et je me demande si c’est une bonne pratique de register tous les components de mon application dans un plugin comme ça :slight_smile:

import Vue from 'vue'

import BaseSmallHeader from '~/components/base/BaseSmallHeader.vue'
import BaseArticle from '~/components/base/BaseArticle.vue'
import BaseText from '~/components/base/BaseText.vue'
import BasePageHeader from '~/components/base/BasePageHeader.vue'
import BaseButton from '~/components/base/BaseButton.vue'

import TheHeader from '~/components/core/TheHeader.vue'
import TheFooter from '~/components/core/TheFooter.vue'

import Welcome from '~/components/partials/home/Welcome.vue'
import Blog from '~/components/partials/home/Blog.vue'
import CoachInstagram from '~/components/partials/home/CoachInstagram.vue'
import CoachStrengths from '~/components/partials/home/CoachStrengths.vue'
import CoachTrailer from '~/components/partials/home/CoachTrailer.vue'
import CustomersTargets from '~/components/partials/home/CustomersTargets.vue'
import Services from '~/components/partials/home/Services.vue'
import Showcase from '~/components/partials/home/Showcase.vue'
import Testimonials from '~/components/partials/home/Testimonials.vue'

import PricingItem from '~/components/shared/PricingItem.vue'
import JwPagination from '~/components/shared/JwPagination.vue'
import jtInstagram from '~/components/shared/jtInstagram.vue'
import error from '~/components/shared/error.vue'

/*************************************
* BASE COMPONENTS *
*************************************/
Vue.component('base-small-header', BaseSmallHeader)
Vue.component('base-article', BaseArticle)
Vue.component('base-text', BaseText)
Vue.component('base-page-header', BasePageHeader)
Vue.component('base-button', BaseButton)
/*************************************/

/*************************************
* CORE COMPONENTS *
*************************************/
Vue.component('the-navbar', TheHeader)
Vue.component('the-footer', TheFooter)
/*************************************/

/*************************************

* PARTIALS COMPONENTS *
*************************************/
// Home
Vue.component('blog', Blog)
Vue.component('coach-instagram', CoachInstagram)
Vue.component('coach-strengths', CoachStrengths)
Vue.component('coach-trailer', CoachTrailer)
Vue.component('customers-targets', CustomersTargets)
Vue.component('services', Services)
Vue.component('showcase', Showcase)
Vue.component('testimonials', Testimonials)
Vue.component('welcome', Welcome)
/*************************************/

/*************************************
* SHARED COMPONENTS *
*************************************/
Vue.component('pricing-item', PricingItem)
Vue.component('jw-pagination', JwPagination)
Vue.component('cj-instagram', jtInstagram)
Vue.component('cj-error', error)
/*************************************/

up, personne ne peut me conseiller ? :frowning:

Je ne saurais t’aider mais j’aimerais bien suivre le topic pour avoir la réponse!

1 Like

merci, j’aimerais vraiment savoir si c’est une bonne chose et si ça n’impacte pas les performances de façon négative