-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: The issue in importing fonts in buildable next.js libraries #66889
base: canary
Are you sure you want to change the base?
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
Could someone please take a look at this small change and suggest me if there is something else that I should do so that this gets merged? It's solving an existing issue in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, could you add a test case for this that fails without this change?
Sure, thanks for the feedback. Will work adding the test cases. |
What?
In the current canary version of Next.js, importing Next.js fonts in any buildable Next.js library is not supported. Attempting to do so will result in a build failure, with an error indicating that the fonts are not exported from the package.
I've created a fresh repository where the issue can be reproduced by following the instructions in the README.
Why?
There are following use cases of having a buildable library
How?
The barrel files in
next/fonts
didn't export the fonts which was the root cause of the issue.Fixes #51476