Skip to content

Docs: Tailwind styles not loading when Next.js middleware blocks _next/static routes #92435

@kohi9noor

Description

@kohi9noor

What is the documentation issue?

I ran into an issue where Tailwind styles were not applied at all in a Next.js app using middleware (proxy.ts)

Is there any context that might help us understand?

The root cause was that middleware was intercepting requests to /_next/static and redirecting them due to the auth logic, which prevented ccss/js chunks from loading.

Suggestion:
It might help to explicitly mention in the docs that middleware should exclude:
-/_next
-/api
-static assets

Otherwise, users may misdiagnose this as a tailwind or PostCSS issue

Does the docs page already exist? Please link to it.

No response

Metadata

Metadata

Assignees

Labels

No fields configured for Documentation.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions