Skip to content

fix(react-router/dom/ssr): add nonce to inline critical css#14691

Merged
brophdawg11 merged 14 commits intoremix-run:devfrom
AnandShiva:dev
Jan 12, 2026
Merged

fix(react-router/dom/ssr): add nonce to inline critical css#14691
brophdawg11 merged 14 commits intoremix-run:devfrom
AnandShiva:dev

Conversation

@AnandShiva
Copy link
Contributor

This PR works on an issue #14666 where the nonce prop passed to the component was not being forwarded to the inline <style> tag generated when criticalCss is provided as a string.

@changeset-bot
Copy link

changeset-bot bot commented Dec 28, 2025

🦋 Changeset detected

Latest commit: e16af60

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 Patch
@react-router/architect Patch
@react-router/cloudflare Patch
@react-router/dev Patch
react-router-dom Patch
@react-router/express Patch
@react-router/node Patch
@react-router/serve Patch
@react-router/fs-routes Patch
@react-router/remix-routes-option-adapter Patch
create-react-router 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

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Dec 28, 2025

Hi @AnandShiva,

Welcome, and thank you for contributing to React Router!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run.

Thanks!

- The Remix team

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Dec 28, 2025

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@AnandShiva
Copy link
Contributor Author

Updated the changeset. Please let me know if anything more is needed for this fix.

@MichaelDeBoey MichaelDeBoey linked an issue Dec 29, 2025 that may be closed by this pull request
@MichaelDeBoey MichaelDeBoey changed the title Bugfix #14666: Inline criticalCss is missing nonce fix(react-router/dom/ssr): add nonce to inline critical css Dec 29, 2025
@AnandShiva
Copy link
Contributor Author

@MichaelDeBoey i see the PR is in changes requested state. If any pending issues, please let me know, can do the same. thank you.

Copy link
Contributor

@brophdawg11 brophdawg11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@brophdawg11 brophdawg11 dismissed MichaelDeBoey’s stale review January 6, 2026 15:17

Feedback addressed

@brophdawg11
Copy link
Contributor

It looks like some of the new unit tests are failing - could you look into those?

@AnandShiva
Copy link
Contributor Author

Yes @brophdawg11 . checking the same.

It looks like some of the new unit tests are failing - could you look into those?

@AnandShiva
Copy link
Contributor Author

The units tests are fixed now @brophdawg11 .

@AnandShiva AnandShiva requested a review from brophdawg11 January 6, 2026 19:25
@AnandShiva
Copy link
Contributor Author

@brophdawg11 have updated the tests to cover the updated code. Please let me know if any feedback's on the same.

@brophdawg11 brophdawg11 merged commit 0bb972b into remix-run:dev Jan 12, 2026
5 checks passed
@AnandShiva
Copy link
Contributor Author

thanks @brophdawg11 🙌

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 7.13.0-pre.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 7.13.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

edmundhung pushed a commit to edmundhung/react-router that referenced this pull request Jan 27, 2026
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.

Inline criticalCss is missing nonce

3 participants