diff --git a/packages/lucide-vue/README.md b/packages/lucide-vue/README.md index 7c5153e..1727f14 100644 --- a/packages/lucide-vue/README.md +++ b/packages/lucide-vue/README.md @@ -105,3 +105,21 @@ export default { ``` + +## Use with [@nuxt/components](https://github.com/nuxt/components#readme) + +### Setup +In your `nuxt.config.js`, add `lucide-vue/nuxt` to your `buildModules` +```js +export default { + buildModules: ['lucide-vue/nuxt'] +} +``` + +### How to use +Icon components are prefixed with `Icon`. Use icon components without importing them. + +### Example +```html + +``` \ No newline at end of file diff --git a/packages/lucide-vue/nuxt.js b/packages/lucide-vue/nuxt.js new file mode 100644 index 0000000..33e6f54 --- /dev/null +++ b/packages/lucide-vue/nuxt.js @@ -0,0 +1,12 @@ +import { join } from 'path' + +export default function () { + + this.nuxt.hook('components:dirs', dirs => { + dirs.push({ + path: join(__dirname, 'dist', 'esm', 'icons'), + prefix: 'Icon', + ignore: ['**/index.js'] + }) + }) +} \ No newline at end of file