Skip to content

userquin/unvuetify-monorepo

Repository files navigation


@unvuetify

Unified Vuetify utilities for Vite and Nuxt.

MIT LICENSE
GitHub stars

🚨 Motivation

This monorepo has been created due to the existing limitations when using vite-plugin-vuetify/webpack-plugin-vuetify and the new features added in Vue 3.5 and Nuxt 3.16: Vue Lazy Hydration and Nuxt 3. Check the comparison table for more details.

@unvuetify is an alternative to vite-plugin-vuetify, you can still use vite-plugin-vuetify or webpack-plugin-vuetify: the packages in this monorepo have been created to provide support for Vite and Nuxt 3 applications, and to provide a more flexible and extensible API via unplugin-vue-components and unplugin-auto-import/unimport.

πŸš€ Features

  • πŸ‘Œ ESM-only packages
  • ⚑ Fully Tree Shakable: use unplugin-vue-components resolvers or unplugin-auto-import presets and only used Vuetify composables, components and directives will be included in the final bundle
  • πŸ’₯ Vue Lazy Hydration support: ready to use Vue Lazy Hydration with Vuetify components and Nuxt 3
  • πŸ”Œ Extensible: allow prefixing Vuetify components, directives and composables with Vuetify prefix
  • ✨ VSCode directives suggestions
  • βš™οΈ Nuxt utilities: drop a simple Nuxt module and it will auto-import all Vuetify components, directives and composables for you
  • 🌍 Nuxt I18n utilities: install @nuxtjs/i18n Nuxt module, drop a simple module to configure Vuetify with i18n support
  • 🦾 Type Strong: written in TypeScript

πŸ› οΈ Packages

πŸ¦„ Usage

There are a lot of packages/modules in this repository, our suggestion is to use the following packages when using:

  • Vite:
    • @unvuetify/unimport-presets for composables and directives presets via unplugin-auto-import
    • @unvuetify/unplugin-vue-components-resolvers resolvers for components via unplugin-vue-components
    • @unvuetify/vite-styles-plugin for styles
  • Nuxt:
  • Nuxt basic (check nuxt-utils usage):
    • @unvuetify/nuxt-utils via Nuxt module using configureVuetify function
  • Nuxt basic i18n (check nuxt-utils usage and nuxt-i18n-utils usage):
    • @unvuetify/nuxt-utils via Nuxt module using configureVuetify function
    • @unvuetify/nuxt-i18n-utils via Nuxt module using configureI18n function

πŸ“₯ Playgrounds

You can open @unvuetify monorepo in StackBlitz:

Warning

@nuxt/fonts dependency removed and settings.scss files updated to run Nuxt playgrounds when running at StackBlitz.

Open in StackBlitz

or just play with individual playgrounds:

Warning

@nuxt/fonts dependency removed and settings.scss file updated when running Nuxt playgrounds at StackBlitz.

Example Source Playground
basic-nuxt GitHub Open in StackBlitz
basic-resolvers GitHub Open in StackBlitz
basic-unimport GitHub Open in StackBlitz
nuxt-i18n GitHub Open in StackBlitz
prefix-nuxt GitHub Open in StackBlitz
prefix-resolvers GitHub Open in StackBlitz
prefix-unimport GitHub Open in StackBlitz

πŸ‘€ Package features comparison

Note

unimport requires a patch to support prefixing Vuetify directives in Nuxt, fixed in unimport v5.0.1 release: check unjs/unimport#447.

Note

Nuxt 3.16.2 requires a patch to support Vue Lazy Hydration, fixed in Nuxt 3.17.0: check nuxt/nuxt#31649.

Feature / Package vite-plugin-vuetify webpack-plugin-vuetify styles1 resolvers2 presets3 Nuxt4
auto-import composables ❌ ❌ ❌ ❌ βœ… βœ…
auto-import components βœ… βœ… ❌ βœ… βœ…5 βœ…
auto-import directives βœ… βœ… ❌ βœ… βœ… βœ…
auto-import labs components βœ… βœ… ❌ βœ… βœ… βœ…
sass/scss variables βœ… βœ… βœ… ❌ ❌ βœ…
sass/scss variables with Vite/Nuxt 3 SSR βœ…6 ❓7 βœ… ❌ ❌ βœ…
prefix composables, directives and components ❌ ❌ ❌ βœ… βœ… βœ…
Nuxt Lazy Hydration ❌ ❌ ❌ ❌ βœ…8 βœ…
VSCode directives suggestions ❌ ❌ ❌ ❌ βœ… βœ…

πŸ“„ License

MIT License Β© 2025-PRESENT JoaquΓ­n SΓ‘nchez

Footnotes

  1. @unvuetify/vite-styles-plugin. ↩

  2. @unvuetify/unplugin-vue-components-resolvers. ↩

  3. @unvuetify/unimport-presets. ↩

  4. vuetify-nuxt-module will support all the features once updated using the packages in this monorepo.
    @unvuetify/nuxt-utils supports all the features, but it is not a drop-in replacement for vuetify-nuxt-module. ↩

  5. @unvuetify/unimport-presets components utilities can be used with Nuxt components loader, won't work with Vite. ↩

  6. vite-plugin-vuetify will work, but we can get some warnings about missing sources. ↩

  7. webpack-plugin-vuetify not tested with Nuxt 3 with or without SSR. ↩

  8. @unvuetify/unimport-presets components utilities can be used with Nuxt components loader. ↩