It's pretty straightforward to set a locale in a per-function call basis:
import { formatRelative, subDays } from 'date-fns'
import { ptBR } from 'date-fns/locale'
formatRelative(subDays(new Date(), 3), new Date(), { locale: ptBR })
But how do I set a default locale to be used app-wide?