Skip to content

Conversation

@katywings
Copy link
Contributor

@katywings katywings commented Dec 17, 2025

What is the current behavior?

CSS from lazy modules in shared chunks is not server rendered, resulting in a flash of unstyled content.

What is the new behavior?

CSS from lazy modules in shared chunks is server rendered.

Other information

When integrating solid-lazy-plus into SolidStart via #1965, I left away the special logic for shared chunks from https://codeberg.org/lufrai/solid-lazy-plus/src/commit/24ec2f7162806dc20845466ed9c049eb1a5bc982/src/vite.ts#L14 as I thought it wasn't needed anymore. Apparently it is still needed 😅.

The fix in devinxied SolidStart is a bit more involved, because Vinxi in PROD allowed the CSS crawling in the server and client manifest, devinxied SolidStart on the other hand only has the client manifest. That's why we have to collect the client chunk names, so that they afterwards can be used in the server code.

@changeset-bot
Copy link

changeset-bot bot commented Dec 17, 2025

🦋 Changeset detected

Latest commit: c26a2a3

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Dec 17, 2025

Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit c26a2a3
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/69466da6a3eca60008791f15
😎 Deploy Preview https://deploy-preview-2032--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@katywings katywings added bug Something isn't working 2.x targeting SolidStart 2.x versions labels Dec 17, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 17, 2025

Open in StackBlitz

npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/start@2032
npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/vite-plugin-nitro-2@2032

commit: c26a2a3

@katywings katywings changed the title WIP: fix: collect css with shared chunk name fix: collect css with shared chunk name Dec 17, 2025
@katywings katywings force-pushed the fix-shared-chunk-css branch from 33c80ed to 042f6b8 Compare December 20, 2025 09:30
@katywings katywings self-assigned this Dec 20, 2025
@katywings katywings force-pushed the fix-shared-chunk-css branch from 042f6b8 to c26a2a3 Compare December 20, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.x targeting SolidStart 2.x versions bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants