Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix(solid-start): avoid duplicate stylesheet links when inlineCss is enabled - #9024

Open
aloneangel45 wants to merge 1 commit into
TanStack:solid-router-v2-prefrom
aloneangel45:fix/9022-solid-inline-css
Open

aloneangel45 wants to merge 1 commit into
TanStack:solid-router-v2-prefrom
aloneangel45:fix/9022-solid-inline-css

Conversation

@aloneangel45

Copy link
Copy Markdown

Fixes #9022

Summary

In Solid 2.x SSR builds, tanstack-solid-start:client-assets-manifest passes virtual:solid-manifest (.vite/manifest.json) into Solid's renderer after neutralizing isEntry: false. While that stopped entry asset duplication, lazy route chunks (e.g. /style) still kept their css arrays in clientAssetsManifest, causing @solidjs/web's resolveAssets() to emit <link rel="stylesheet"> tags alongside TanStack Start's inlined <style data-tsr-inline-css="">.

Changes

  • In packages/solid-start/src/plugin/vite.ts (tanstack-solid-start:client-assets-manifest), when process.env.TSS_INLINE_CSS_ENABLED === 'true' and tanstack-start-manifest:v is available, filter out any entry.css href already present in tsrStartManifest().inlineCss?.styles (resolved against manifest._base). Non-inlined lazy() CSS and builds with inlineCss disabled remain untouched.
  • Added unit tests in packages/solid-start/tests/vite-client-assets-manifest.test.ts covering inlineCss enabled (including non-inlined CSS retention), custom _base paths, and inlineCss disabled.

Verification

  • pnpm --filter @tanstack/solid-start exec prettier --check src/plugin/vite.ts tests/vite-client-assets-manifest.test.ts
  • pnpm --filter @tanstack/solid-start exec eslint src/plugin/vite.ts
  • pnpm --filter @tanstack/solid-start exec tsc -p tsconfig.json --noEmit
  • pnpm --filter @tanstack/solid-start build
  • pnpm --filter @tanstack/solid-start exec vitest run (3 files, 10 tests passing)

@changeset-bot

changeset-bot Bot commented Nov 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d1a7523

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant