base_ui/components/global/readme.me

16 lines
586 B
Plaintext
Raw Permalink Normal View History

2025-02-01 09:34:55 +00:00
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.