kopia lustrzana https://github.com/elk-zone/elk
17 wiersze
440 B
TypeScript
17 wiersze
440 B
TypeScript
import { defineNuxtModule, useNuxt } from '@nuxt/kit'
|
|
|
|
export default defineNuxtModule({
|
|
meta: {
|
|
name: 'setup-components',
|
|
},
|
|
setup() {
|
|
const nuxt = useNuxt()
|
|
nuxt.hook('components:extend', (components) => {
|
|
for (const component of components) {
|
|
component.pascalName = component.pascalName.replace(/Setup$/, '')
|
|
component.kebabName = component.kebabName.replace(/-setup$/, '')
|
|
}
|
|
})
|
|
},
|
|
})
|