Skip to content

Upgrading @nuxt/fonts 0.13 to 0.14

Breaking0.13.0 → 0.14.0Breaking2New7Changed2Fixed7Other5

BreakingUpgrade verdict

2 breaking changes.

  • Fonts are now served only in the modern woff2 format by default, which all current browsers support.
  • After upgrading, cached font information is discarded and fonts are downloaded again on the next build, once.
2 items need code or config changes

Drops css-tree, esbuild, fontaine, jiti, magic-string, ohash.

Installs 131 packages in all (was 173).

Breaking2
Changes the default font format resolution to woff2 only, reducing @font-face src entries.
defaults.formats
Isolates font metadata caches per provider and provider options, invalidating existing caches once.
node_modules/.cache/nuxt/fonts/

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • removed: export { F as FontProvider } from './shared/fonts.[hash]'
  • added: export { F as FontProvider } from './shared/fonts.B-on05Ea'
  • added: export { FontFaceMeta } from 'unifont'
  • added: export { FontFormat } from 'fontless'
  • added: export { FontStyles } from 'unifont'
  • added: export { InitializedProvider } from 'unifont'
  • added: export { ProviderFamilyOptions } from 'fontless'
  • added: export { ResolveFontResult } from 'unifont'
  • added: interface F<FontProviderOptions = Record<string, unknown>>
  • added: interface M
  • added: interface a extends FontlessOptions
  • added: property F.resolveFontFaces?: (fontFamily: string, options: ResolveFontOptions) => Awaitable<void | ResolveFontResult>
  • added: property F.setup?: (options: FontProviderOptions, nuxt: Nuxt) => Awaitable<void>
  • added: property M.'fonts:providers': (providers: Record<string, ProviderFactory<string> | FontProvider>) => void | Promise<void>
  • added: property M.'fonts:public-asset-context': (context: NormalizeFontDataContext) => void | Promise<void>
  • added: property a.devtools?: boolean
  • removed: interface F<FontProviderOptions = Record<string, unknown>>
  • removed: interface M
  • removed: interface a extends FontlessOptions
  • removed: property F.resolveFontFaces?: (fontFamily: string, options: ResolveFontOptions) => Awaitable<void | { fonts: FontFaceData[]; fallbacks?: string[] }>
  • removed: property F.setup?: (options: FontProviderOptions, nuxt: Nuxt) => Awaitable<void>
  • removed: property M.'fonts:providers': (providers: Record<string, ProviderFactory | FontProvider>) => void | Promise<void>
  • removed: property M.'fonts:public-asset-context': (context: NormalizeFontDataContext) => void | Promise<void>
  • removed: property a.devtools?: boolean
  • removed: export { FontProvider } from './shared/fonts.[hash]'
  • added: export { FontFaceMeta } from 'unifont'
  • added: export { FontFormat } from 'fontless'
  • added: export { FontProvider } from './shared/fonts.B-on05Ea'
  • added: export { FontStyles } from 'unifont'
  • added: export { InitializedProvider } from 'unifont'
  • added: export { ProviderFamilyOptions } from 'fontless'
  • added: export { ResolveFontResult } from 'unifont'
  • changed: function toUnifontProvider<FontProviderOptions = Record<string, unknown>>(name: string, provider: FontProvider<FontProviderOptions>): unifont.ProviderFactory<FontProviderOptions> → function toUnifontProvider(name: string, provider: FontProvider): ProviderFactory<string, any, any>