solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

[Bug?]: The same stylesheet appear above html element when use props.children to render

Open will-chc opened this issue 11 months ago • 5 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Current behavior 😯

In SolidStart SSR, when using <Wrap>{props.children}</Wrap>, styles repeatedly appear in the body, with SCSS being included multiple times as

This issue occurs in the SolidStart "basic" template.

image

Expected behavior 🤔

No response

Steps to reproduce 🕹

Steps:

Context 🔦

No response

Your environment 🌎

No response

will-chc avatar Jan 03 '25 02:01 will-chc

image This issue causes the CSS style debugging in devtools to be ineffective. The duplicate styles must be deleted in order for the changes to take effect.

will-chc avatar Jan 06 '25 07:01 will-chc

it’s related to Vite HMR! I tried removing all stylesheets outside of the “head” and that caused vite css hmr to stop working image

will-chc avatar Jan 06 '25 07:01 will-chc

Can you share an example of how your using props.children? I am guessing it bundles properly for prod but not for dev? I would guess this is a vinxi thing.

brenelz avatar Jan 24 '25 00:01 brenelz

Can you share an example of how your using props.children? I am guessing it bundles properly for prod but not for dev? I would guess this is a vinxi thing.

you can reproduce with the ”base“ template (solidstart) There are two imports of counter.css, which is unintended. Image

will-chc avatar Jan 24 '25 08:01 will-chc

#1654 the same bug

will-chc avatar May 08 '25 06:05 will-chc