ui-pablo
Version:
38 lines (35 loc) • 759 B
JavaScript
// import { join } from 'pathe'
// import { defineNuxtModule } from '@nuxt/kit'
//
// export default defineNuxtModule({
// hooks: {
// 'components:dirs'(dirs) {
// dirs.push({
// path: join(__dirname, 'components'),
// prefix: 'p'
// })
// }
// }
// })
// import { join } from 'path'
//
// export default function () {
// this.nuxt.hook('components:dirs', dirs => {
// dirs.push({
// path: join(__dirname, 'components'),
// prefix: 'p'
// })
// })
// }
import { defineNuxtModule } from '@nuxt/kit'
import { fileURLToPath } from 'node:url'
export default defineNuxtModule({
hooks: {
'components:dirs'(dirs) {
dirs.push({
path: fileURLToPath(new URL('./components', import.meta.url)),
prefix: 'p'
})
}
}
})