Skip to content

Broken CSS imports in lazy loaded components in SSR #306

@33KK

Description

@33KK

Describe the bug

The component imported using lazy(() => import("Component")) does not import the CSS file in SSR

Your Example Website or App

https://github.com/33kk/solid-ssr-test

Steps to Reproduce the Bug or Issue

Disable JS. There's an anchor tag for components loaded with import Component from "...", lazy(() => import("Component")) and solid-start's <FileRoutes />, the components imports a CSS file that colors the corresponding anchor tag red.

Expected behavior

The component imported using lazy(() => import("Component")) should load the imported CSS file in SSR but it does it only after hydration.

Screenshots or Videos

No response

Platform

  • OS: Linux
  • Browser: Firefox
  • Version: 106

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions