Skip to content

Comments

fix(react-router-dev): avoid duplicate stylesheet links for nested suspended routes#14793

Open
joseph0926 wants to merge 1 commit intoremix-run:devfrom
joseph0926:fix/vite-css-duplicate-links
Open

fix(react-router-dev): avoid duplicate stylesheet links for nested suspended routes#14793
joseph0926 wants to merge 1 commit intoremix-run:devfrom
joseph0926:fix/vite-css-duplicate-links

Conversation

@joseph0926
Copy link
Contributor

@joseph0926 joseph0926 commented Feb 10, 2026

This seems to be a problem caused by adding #, similar to the previously submitted PR (#14687), so I attempted to fix it.

Fixes duplicated stylesheet links in Framework mode for suspended components in nested routes

When reproducing the issue, I confirmed it does not occur in dev mode, but does occur when running the built app.
The behavior appears related to the forced-unique # stylesheet href logic introduced to preserve dynamic-import CSS behavior.

Changes

  • Added e2e test
    • integration/vite-css-suspended-duplicate-test.ts
  • Updated Vite plugin stylesheet href handling
    • packages/react-router-dev/vite/plugin.ts

Fixes #14754

@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

🦋 Changeset detected

Latest commit: 200ba23

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

This PR includes changesets to release 11 packages
Name Type
@react-router/dev Patch
@react-router/fs-routes Patch
@react-router/remix-routes-option-adapter Patch
create-react-router Patch
react-router Patch
react-router-dom Patch
@react-router/architect Patch
@react-router/cloudflare Patch
@react-router/express Patch
@react-router/node Patch
@react-router/serve Patch

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant