unplugin-vue-components icon indicating copy to clipboard operation
unplugin-vue-components copied to clipboard

How do we add prefix for all components?

Open pbtkhoa opened this issue 2 years ago • 5 comments

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

pbtkhoa avatar Jun 29 '22 10:06 pbtkhoa

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.

kasperskov-pdk avatar Sep 01 '22 11:09 kasperskov-pdk

Do you have found a solution?

I also want to prefix all my components. For example:

WButton should resolve src/components/Button.vue

RuBaWa avatar Oct 14 '22 08:10 RuBaWa

The returned object also needs a "from" property. But I can't figure out how to do it right.

Veseron avatar Oct 16 '22 20:10 Veseron

any updates?

acibilous avatar Jun 14 '23 08:06 acibilous