Nuxt layer component prefix
How do i make a prefix like Nuxt UI Pro has?
Nuxt UI Pro has the U prefix and i would like that for my components too (Instead of "U" i want my layer to use "VD". I can't seem to get it to work
1 Reply
If you want all components in that layer to be prefixed with 'VD' then you would do something like this in your nuxt config:
With this you can put any components inside the layers components folder and when using those components you have to prefix them with VD. Notice the 'pathPrefix: false' is optional, the default behaviour being true. If its false you can structure your folders in any way you want inside that layer. If you want to structure them the default way you remove that option.
Another example would be :
This way we can have prefixed only the components we have in vd_components and the components folder behaves defaultly. Hope it helps