Skip to content

Conversation

ivodolenc
Copy link
Owner

Types of Changes

  • Bug fix 🐛

Request Description

Fixes errors when importing font composables.

Composables are now imported using the #font-loader alias.

<!-- index.vue -->

<template>
  <h1 class="font-aspekta">Nuxt Font Loader</h1>
</template>

<script setup lang="ts">
  import { useLocalFont } from '#font-loader'

  useLocalFont([
    {
      src: '/fonts/Aspekta.woff2',
      family: 'Aspekta',
      class: 'font-aspekta' // optional
    }
  ])
</script>

@ivodolenc ivodolenc added the fix New bug fix. label Dec 2, 2022
@ivodolenc ivodolenc merged commit 257f20f into main Dec 2, 2022
@ivodolenc ivodolenc deleted the fix/composables-import branch December 2, 2022 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix New bug fix.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant