next.js
e3875d74 - next/font/local support for Turbopack (#47369)

Commit
2 years ago
next/font/local support for Turbopack (#47369) Fixes WEB-249 Depends on vercel/turbo#4288 This implements support for `next/font/local` for Turbopack. It: * Removes the compile-time feature restricting access to `next/font/local` * Implements `NextFontLocalReplacerVc` and `NextFontLocalCssModuleReplacerVc`, similar to their `next/font/google` equivalents, and adds them as ImportMappings to handle requests for `next/font/local/target.css` and `@vercel/turbopack-next/internal/font/local/cssmodule.module.css` (these requests are created by the JavaScript returned by the requests for the `target.css` module) * Implements fallback support for Times New Roman and Arial via `adjust_font_fallback` as the webpack implementation does. Font metric override adjustment will be added in a future PR. Test Plan: New passes 14 next-font integration tests in the Next.js integration test suite, up from 8.
Author
Parents
Loading