You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zapaiamarce
changed the title
Font family name on production build is invalid
Font family names on production build is invalid @next/font
Oct 31, 2022
zapaiamarce
changed the title
Font family names on production build is invalid @next/font
Font family names on production build are invalid @next/font
Oct 31, 2022
Use the name of the assigned const as the family name instead of trying
to get it from the font file. That way we know we won't get any invalid
characters in the font-family name.
fixes#42264
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`
## Documentation / Examples
- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
Co-authored-by: JJ Kasper <[email protected]>
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64
Binaries:
Node: 16.13.2
npm: 8.1.4
Yarn: 1.22.10
pnpm: N/A
Relevant packages:
next: 13.0.1-canary.3
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
Chrome 106.0.5249.119
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
In dev mode font family names have single quotes (at least for local fonts):
Removing the quotes for production build generates invalid font family names:
Expected Behavior
Generate valid font family names for production build or keep the quotes.
Link to reproduction
https://github.com/zapaiamarce/next-font-issues
To Reproduce
run dev mode
yarn dev
check the font-family name and the output
run production build
yarn build
check the font-family name and the output
The text was updated successfully, but these errors were encountered: