I have successfully added my font to my Quasar project. Only this is not visible because the old font still overwrites it. I've read the documentation(https://quasar.dev/style/typography#default-font) about removing Roboto font but this only applies to quasar.config file which I don't have. Only vite.config.js And I can't get the font removed there. So my question is how can I delete a simple font in the right way.
This is my main.js at the moment.
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from "./router"; //router
import { createPinia } from "pinia"; //state managment
import { Quasar } from 'quasar'
import iconSet from 'quasar/icon-set/svg-line-awesome'
import '@quasar/extras/line-awesome/line-awesome.css'
import 'quasar/dist/quasar.css'
import { i18n } from './lang/i18n' //lang
createApp(App).use(i18n).use(createPinia()).use(router).use(Quasar,{plugins: {},lang: quasarLang, iconSet: iconSet, extras: []}).mount("#app");
CodePudding user response:
According to documentation, you can supply Quasar options to Vite config. Like so:
// FILE: vite.config.js
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { quasar, transformAssetUrls } from '@quasar/vite-plugin'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
template: { transformAssetUrls }
}),
quasar({
sassVariables: 'src/quasar-variables.sass',
extras: [
'roboto-font'
]
})
]
})