I've been doing a lot of searching on Google, but I can't seem to find the solution. It seems like the challenge might be that the Nuxt 3 + Vuetify 3 combination isn't widely used yet?
My current task is to implement a custom default font. I've attempted to do this through nuxt.config.ts
in the same way I did with Nuxt 2.
vuetify: {
customVariables: ["~/assets/variables.scss"],
treeShake: true,
},
However, it's not working as expected.
Right now, I'm using plugins/vuetify.ts
to define the theme and colors. I believe the font should be set there, but I'm unsure how to do it.
import { createVuetify, ThemeDefinition } from "vuetify";
import * as components from "vuetify/components";
import * as directives from "vuetify/directives";
import "@mdi/font/css/materialdesignicons.css";
const myTheme: ThemeDefinition = {
dark: false,
colors: {
primary: "#HEXHEX",
},
variables: {}
};
export default defineNuxtPlugin(nuxtApp => {
const vuetify = createVuetify({
components,
directives,
theme: {
defaultTheme: "myTheme",
themes: {
myTheme
}
},
});
nuxtApp.vueApp.use(vuetify);
});
The themes are functioning correctly, but I'm uncertain about how to replace the default fonts/styles. Has anyone encountered this issue and successfully resolved it?