Skip to content
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

fix: add #font-loader alias for import composables #14

Merged
merged 1 commit into from
Dec 2, 2022

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