16 lines
586 B
Plaintext
16 lines
586 B
Plaintext
Alternatively, though not recommended, you can register all your
|
|
components globally, which will create async chunks for all your
|
|
components and make them available throughout your application.
|
|
|
|
export default defineNuxtConfig({
|
|
components: {
|
|
+ global: true,
|
|
+ dirs: ['~/components']
|
|
},
|
|
})
|
|
|
|
You can also selectively register some components globally by
|
|
placing them in a ~/components/global directory, or by using a
|
|
.global.vue suffix in the filename. As noted above, each global
|
|
component is rendered in a separate chunk, so be careful not to
|
|
overuse this feature. |