mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-24 17:00:36 +01:00
chore: use dirs
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { resolve, join } from 'pathe'
|
||||
import { join } from 'pathe'
|
||||
import { defineNuxtModule, installModule, addPlugin, resolveModule } from '@nuxt/kit'
|
||||
import { colors } from '@unocss/preset-uno'
|
||||
import type { UnocssNuxtOptions } from '@unocss/nuxt'
|
||||
import { runtimeDir, componentsDir } from './dirs'
|
||||
|
||||
export default defineNuxtModule({
|
||||
name: '@nuxthq/ui',
|
||||
@@ -95,9 +96,6 @@ export default defineNuxtModule({
|
||||
|
||||
await installModule(nuxt, { src: '@unocss/nuxt', options })
|
||||
|
||||
const runtimeDir = resolve(__dirname, 'runtime')
|
||||
const componentsDir = resolve(__dirname, 'components')
|
||||
|
||||
addPlugin(resolveModule('./plugin', { paths: runtimeDir }), { append: true })
|
||||
|
||||
nuxt.hook('components:dirs', (dirs) => {
|
||||
|
||||
Reference in New Issue
Block a user