Use nuxt fonts module

This commit is contained in:
Nicola Spadari
2024-10-08 12:04:07 +02:00
parent bfed1f0ce9
commit 675f393b5c
4 changed files with 645 additions and 171 deletions

View File

@@ -3,6 +3,7 @@ export default defineNuxtConfig({
"@vueuse/nuxt",
"@unocss/nuxt",
"@nuxt/icon",
"@nuxt/fonts",
"nuxt-svgo",
"@nuxt/eslint"
],
@@ -30,12 +31,20 @@ export default defineNuxtConfig({
experimental: {
typedPages: true
},
fonts: {
defaults: {
weights: [`${100}..${900}`]
}
},
css: [
"@unocss/reset/tailwind.css"
],
svgo: {
autoImportPath: "@/assets/"
},
icon: {
mode: "svg"
},
vite: {
clearScreen: false,
envPrefix: ["VITE_", "TAURI_"],

View File

@@ -23,6 +23,7 @@
"tauri:build:debug": "tauri build --debug"
},
"dependencies": {
"@nuxt/fonts": "^0.10.0",
"@tauri-apps/api": ">=2.0.2",
"@tauri-apps/plugin-fs": "^2.0.0",
"@tauri-apps/plugin-notification": "^2.0.0",

790
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,6 @@ import {
presetTagify,
presetTypography,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup
} from "unocss";
@@ -20,18 +19,13 @@ export default defineConfig({
presetUno(),
presetTagify(),
presetAttributify(),
presetTypography(),
presetWebFonts({
fonts: {
heading: {
name: "Montserrat",
weights: ["200", "400", "700"]
},
text: "Inter"
}
})
presetTypography()
],
theme: {
fontFamily: {
heading: "Montserrat",
text: "Inter"
},
breakpoints: {
sm: "576px",
md: "768px",