The font loader should tolerate backtick strings without template variables #63041
Labels
bug
Issue was opened via the bug report template.
Font (next/font)
Related to Next.js Font Optimization.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/modest-mestorf-42dh9l
To Reproduce
next/font
call with backtick strings:Current vs. Expected behavior
Next.js crashes on template-less backtick strings when used within a
localFont
call. It should tolerate such strings, as they are fully static. Some lint rules even enforce their use everywhere possible, rather than'
or"
.Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 Binaries: Node: 20.11.1 npm: 10.2.4 Yarn: 4.1.1 pnpm: N/A Relevant Packages: next: 14.1.3 eslint-config-next: 14.1.3 react: 18.2.0 react-dom: 18.2.0 typescript: 5.4.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Font optimization (next/font)
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: