Skip to content

Commit

Permalink
chore: handle consola type
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 17, 2024
1 parent d7fdca5 commit c48a624
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useLogger } from '@nuxt/kit'
import type { ConsolaInstance } from 'consola'

export const logger = useLogger('@nuxt/fonts')
export const logger: ConsolaInstance = useLogger('@nuxt/fonts')
3 changes: 2 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ export default defineNuxtModule<ModuleOptions>({
// Rewrite font source URLs to be proxied/local URLs
const fonts = normalizeFontData(result?.fonts || [])
if (!fonts.length || !result) {
return logger.warn(`Could not produce font face declaration from \`${override.provider}\` for font family \`${fontFamily}\`.`)
logger.warn(`Could not produce font face declaration from \`${override.provider}\` for font family \`${fontFamily}\`.`)
return
}
exposeFont({
type: 'override',
Expand Down

0 comments on commit c48a624

Please sign in to comment.