unplugin-vue-components
unplugin-vue-components copied to clipboard
How do we add prefix for all components?
I'm trying to add prefixes to all components. And I can't find how to do it? Could you somehow add it as a feature? Thanks a lot
Would be nice. I tried
resolvers: [
(name) => {
if (!name.startsWith('prefix')) {
console.log(name + ' is missing prefix');
return { name: 'prefix' + name };
}
}
]
Does not work. The resolver is only for resolving the path.
Do you have found a solution?
I also want to prefix all my components. For example:
WButton
should resolve src/components/Button.vue
The returned object also needs a "from" property. But I can't figure out how to do it right.
any updates?