Skip to content

(SolidJs) Css reloads upon navigation when <HeadContent /> is in body #6601

@carere

Description

@carere

Which project does this relate to?

Start

Describe the bug

When navigating on the zaidan project (branch bug/css-reload-on-navigation), the css is fetch on each navigation, we can see it on the network tab.

Your Example Website or App

https://github.com/carere/zaidan/tree/bug/css-reload-on-navigation

Steps to Reproduce the Bug or Issue

  1. Git clone zaidan project
  2. Checkout the bug/css-reload-on-navigation branch
  3. bun install then bun --bun run dev
  4. Go to http://localhost:3000
  5. Navigate to any component
  6. Observe the reload (white flash due to css reload, observe network tab also)

Expected behavior

We should not have css reload

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.157.18
  • OS: macOs arm64
  • Browser: Comet (Chrome based)
  • Browser Version: 143.0.7499.170
  • Bundler: vite
  • Bundler Version: rolldown-vite (7.3.1)

Additional context

Zaidan aims to mimic Shadcn "Create" website. When displaying components preview, we use an iframe to render the components, the iframe is using the __root.tsx shell to render. Maybe it is coming from there

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions