base_ui/components/global/readme.me
2025-02-01 13:04:55 +03:30

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.