in nuxt.config:
....
/*
** Plugins to load before mounting the App
*/
plugins: ['~/plugins/autoloads.js' /*, ... */],
....| import Vue from 'vue' | |
| // Variant #1 | |
| [ 'FDummy' ].forEach(name => Vue.component(name, () => import(`~/components/${name}.vue`))) |
| import Vue from 'vue' | |
| // Variant #2 | |
| const components = { FDummy /*, .... */ } | |
| import FDummy from '@/components/FDummy.vue' | |
| /* | |
| .... | |
| .... | |
| */ | |
| Object.entries(components).forEach(([name, component]) => { | |
| Vue.component(name, component) | |
| }) |