-
-
Notifications
You must be signed in to change notification settings - Fork 941
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add Vuetify3 in your template (or new template) ? #85
Comments
See the docs for Vite SSG for more details. |
Thank you. For information, this is how to add Vuetify 3. // modules/vuetify.js
// /src/main.ts
|
@frck006 : I have tried the same, but it seems that I adding vuetify 3 fails: Have you also changed the Do you maybe havea working example? |
@peterbud I got mine working by creating a custom version of VuetifyResolver to change the import path from src/plugins/vuetifyResolver.ts /**
* Resolver for Vuetify v3
*
* @link https://github.com/vuetifyjs/vuetify
*/
export function VuetifyResolver(): any {
return (name: string) => {
if (name.match(/^V[A-Z]/))
return { importName: name, path: 'vuetify' }
}
} vite.config.ts import { VuetifyResolver } from './src/plugins/vuetifyResolver'
export default defineConfig({
plugins: [
// https://github.com/antfu/vite-plugin-components
ViteComponents({
customComponentResolvers: [
// https://github.com/vuetifyjs/vuetify/
VuetifyResolver(),
],
}),
],
}) src/modules/vuetify.ts import '@mdi/font/css/materialdesignicons.css'
import { createVuetify } from 'vuetify'
// import * as components from 'vuetify/lib/components'
import * as directives from 'vuetify/lib/directives'
import 'vuetify/lib/styles/main.sass'
import { UserModule } from '~/types'
// https://github.com/vuetifyjs/vuetify/
export const install: UserModule = ({ app }) => {
const vuetify = createVuetify({
// Components will be imported by vite-plugin-components
// components,
directives,
})
app.use(vuetify)
} This should probably be turned into a pull request similar to unplugin/unplugin-vue-components#32 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hi,
I would like to use Vuetify instead of tailwind.
Until now Vuetify was not compliance with Vue3, but now, there is Vuetify 3 Alpha.
Normaly, we can use it with vue-cli 4 and add
How can I do this with ViteSSG ?
Regards,
Franck
The text was updated successfully, but these errors were encountered: