nuxt-authorization icon indicating copy to clipboard operation
nuxt-authorization copied to clipboard

Does nuxt-authorization support auto-import of its components and composables?

Open alifnuryana opened this issue 11 months ago • 1 comments

Hello,

Thank you for developing the nuxt-authorization module; it's a valuable tool for managing permissions in Nuxt applications.

I have a question regarding the usage of this module: After installing nuxt-authorization, are its components and composables automatically available for use in my project, or do I need to import them manually?

Specifically, I'm interested in understanding if components like <Can> and <Cannot> are auto-imported, or if there's a recommended way to import them into my project.

I have reviewed the Nuxt Auto-imports documentation but would appreciate clarification on how it applies to nuxt-authorization.

Thank you for your assistance.

alifnuryana avatar Feb 16 '25 04:02 alifnuryana

@alifnuryana Yes, the utilities and components are imported. The auto-imports are defined here: https://github.com/Barbapapazes/nuxt-authorization/blob/8a1b5462335429718e8f31bbb3c3f59e7e238731/src/module.ts#L40-L54

luc122c avatar Apr 03 '25 15:04 luc122c