Skip to content

Commit

Permalink
Turbopack: Implement next/font/local with BeforeResolvePlugin and…
Browse files Browse the repository at this point in the history
… show custom error message (#65870)

Depends on vercel/turborepo#8165

This:
- Creates and uses a `BeforeResolvePlugin` to handle requests to
`next/font/local/target.css` instead of `ImportMapping` replacers
- Returns a `ResolveResultItem::Error` which includes a custom
`StyledString` describing the missing font file

Test Plan: `TURBOPACK=1 pnpm test-dev
test/e2e/app-dir/next-font/next-font.test.ts`
  • Loading branch information
wbinnssmith committed May 20, 2024
1 parent 325a490 commit 4ff11d0
Show file tree
Hide file tree
Showing 11 changed files with 331 additions and 351 deletions.
99 changes: 39 additions & 60 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4ff11d0

Please sign in to comment.