unimport icon indicating copy to clipboard operation
unimport copied to clipboard

Auto-Import vue directives

Open TheAlexLichter opened this issue 1 year ago • 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

  • [X] Would you be willing to help implement this feature?

TheAlexLichter avatar Mar 28 '24 09:03 TheAlexLichter

Sounds good if you managed to implement it :)

antfu avatar Mar 28 '24 10:03 antfu

I'll look into how and might ping you if I have questions 👀

TheAlexLichter avatar Mar 28 '24 10:03 TheAlexLichter