Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Feature Request] Export list of API for auto import #294

Open
kingyue737 opened this issue Mar 7, 2023 · 2 comments
Open

[Feature Request] Export list of API for auto import #294

kingyue737 opened this issue Mar 7, 2023 · 2 comments
Assignees

Comments

@kingyue737
Copy link

kingyue737 commented Mar 7, 2023

I want to use Vuetify 3 APIs like useTheme without manually importing, via unplugin-auto-import. It's a little cumbersome to add Vuetify's APIs to plugin's config in each of my Vuetify project. I wonder if the official plugin of Vuetify can export this preset.

I once opened a PR unjs/unimport#225 (comment) but the maintainer thought it might be better to have Vuetify to provide the list.

As shown in the example of unplugin-vue-router, we might use Vuetify API preset like this:

import { defineConfig } from 'vite'
import AutoImport from 'unplugin-auto-import/vite'
import { vuetifyAutoImports } from 'vite-plugin-vuetify'

 export default defineConfig({
   plugins: [
     // other plugins
     AutoImport({
       imports: [
         vuetifyAutoImports,
       ],
     }),
   ],
 })
@chunfenghuayu1

This comment was marked as off-topic.

@tjhiggins
Copy link

Would like this for useDate() as well

@KaelWD KaelWD self-assigned this Feb 28, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants