Closed AndreyYolkin closed 4 months ago
I'll keep current behavior, the linked PR no makes sense, check https://github.com/userquin/vuetify-nuxt-module/pull/239#issuecomment-2223534574
I'm going to update the docs... auto import is better than changing the configuration or dealing with errors.
I still doubt, because if I register directive via nuxtApp.vueApp.directive() with VTooltip
name it will be overridden. Probably we can address the issue to the vuetify vite plugin itself, but as a compromise i would suggest adding another option inside moduleConfig to fine-tune the vite plugin
Why? If you use some directive/component, the plugin will auto import them for you, that's the expected behavior.
Why do you need to register the directive if the plugin will do it for you? We're using Vite (Rollup), no dead code and no code duplication.
I don't want to use the tooltip provided by vuetify, but want to have own directive with the same name (v-tooltip is very common). The only way for now is to write custom autoimport rule to resolve cutom directive before it's done by vuetify
@AndreyYolkin that's another problem, cannot use x-tooltip
for example?
I'll try to add ignore directives option, the option will be provided directly to the vuetify plugin
Similar to https://github.com/userquin/vuetify-nuxt-module/issues/226, but with further investigation
Version
vuetify: 3.6.11
nuxt-vuetify-module: 0.14.1
nuxt: 3.12.3
Intro
We have VuetifyOptions with directives and components fields
However, selected options does't make an effect on vite-plugin, as it still autoimports the components and directives
The reason is https://github.com/userquin/vuetify-nuxt-module/blob/be68923fa4a46c45bf2ade1f0070319b84ceb608/src/utils/configure-vite.ts#L68 is always an empty object
Case
Part of page:
Default output:
When I pass
{ autoImport: { ignore: ['Tooltip'] }
as argument (+ extra log for options):I expect that options provided in directives and components will effect on autoImports list