Skip to content

docs(examples): use rel instead of type for modulepreload links - #4585

Merged
pi0 merged 1 commit into
nitrojs:mainfrom
cprecioso:cprecioso/fix-modulepreload-rel
Sep 7, 2026
Merged

docs(examples): use rel instead of type for modulepreload links#4585
pi0 merged 1 commit into
nitrojs:mainfrom
cprecioso:cprecioso/fix-modulepreload-rel

Conversation

@cprecioso

@cprecioso cprecioso commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

The Vite SSR examples create <link type=modulepreload> tags but it's actually <link rel=modulepreload> (MDN link). Straightforward fix.


Disclosure: the patch was written by an AI agent (Claude Code), reviewed and driven by me.

The modulepreload hint is set via the rel attribute; type="modulepreload" was a no-op.
@cprecioso
cprecioso requested a review from pi0 as a code owner September 6, 2026 19:23
@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

@cprecioso is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: e7d15063-3ee3-43f2-b3a0-c04416e6b205

📥 Commits

Reviewing files that changed from the base of the PR and between c5177e9 and 55e8478.

📒 Files selected for processing (9)
  • docs/4.examples/vite-ssr-preact.md
  • docs/4.examples/vite-ssr-react.md
  • docs/4.examples/vite-ssr-solid.md
  • examples/vite-ssr-preact/README.md
  • examples/vite-ssr-preact/src/entry-server.tsx
  • examples/vite-ssr-react/README.md
  • examples/vite-ssr-react/src/entry-server.tsx
  • examples/vite-ssr-solid/README.md
  • examples/vite-ssr-solid/src/entry-server.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Changes

The SSR examples for Preact, React, and Solid now use rel="modulepreload" instead of type="modulepreload" in source files and documentation snippets.

SSR modulepreload updates

Layer / File(s) Summary
Preact SSR preload links
examples/vite-ssr-preact/..., docs/4.examples/vite-ssr-preact.md
Updated Preact source and documentation examples to use rel="modulepreload".
React SSR preload links
examples/vite-ssr-react/..., docs/4.examples/vite-ssr-react.md
Updated React source and documentation examples to use rel="modulepreload".
Solid SSR preload links
examples/vite-ssr-solid/..., docs/4.examples/vite-ssr-solid.md
Updated Solid source and documentation examples to use rel="modulepreload".

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 55e84

React, Preact, and Solid SSR examples now emit standard module preload links, with matching README and documentation updates. The change is limited and ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (6 skipped: 6 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title follows Conventional Commits syntax with the docs(examples): type and scope. It accurately describes the modulepreload attribute updates.
Description check ✅ Passed The description clearly explains the attribute correction and identifies the affected modulepreload links. It matches the pull request changes.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@pi0 pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@pkg-pr-new

pkg-pr-new Bot commented Sep 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nitro@4585

commit: 55e8478

@pi0
pi0 merged commit 8baa894 into nitrojs:main Sep 7, 2026
12 of 13 checks passed
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.

2 participants