Skip to content

Hydration mismatch when using tailwind #14452

@n-berilov

Description

@n-berilov

Reproduction

https://stackblitz.com/edit/github-sqxbkkmh?file=app%2Froot.tsx

Expected Behavior

no hydration mismatch

Actual Behavior

hydration mismatch

Note

This can be resolved by using import './app.css'; without export const links:, but this doesn't allow configuration like this:

import stylesheet from './app.css?url';

export const links: Route.LinksFunction = () => [
  // trick to improve performance by unblocking render by preloading css (helps with PageSpeed Insights and slow networks)
  { rel: 'preload', href: stylesheet, as: 'style' },
  { rel: 'stylesheet', href: stylesheet },
];

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions