Skip to content
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 static dirs look up in Next.js projects #21119

Merged
merged 2 commits into from
Feb 16, 2023

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Feb 16, 2023

Closes #20938

What I did

We found that the middleware for static paths was not awaited, and coult potentially be injected as middleware too-late.

After that fix didn't make the issue go away, we investigated the failure further and found out the true reason why it was failing.. a bad if statement in the useStatics function itself, was checking the wrong thing, and caused statics to be undefined.

How to test

Running a nextjs sandbox should show the proper fonts, and not have any 404's for fonts or CSS.

Co-authored-by: Norbert de Langen <ndelangen@me.com>
@ndelangen ndelangen merged commit 3c08e1d into next Feb 16, 2023
@ndelangen ndelangen deleted the valentin/fix-static-dir-fonts-in-nextjs branch February 16, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Default fonts are not found using v7 beta
2 participants