unjs/unimport

Auto-Import vue directives

Closed this issue ยท 2 comments

Describe the feature

Hey all ๐Ÿ‘‹๐Ÿป

It would be great if Vue directives could be auto-imported when being used.

Example code which should "magically work":

In the component:

<template>
  <div v-my-directive>Hey</div>
</template>

Auto-imported file:

export const vMyDirective = {/*...*/}

Additional information

  • Would you be willing to help implement this feature?

Sounds good if you managed to implement it :)

I'll look into how and might ping you if I have questions ๐Ÿ‘€