Skip to content

fix: register robots Nitro types for node context#305

Merged
harlan-zw merged 1 commit into
mainfrom
fix/304-nuxt-node-route-rule-types
Jun 26, 2026
Merged

fix: register robots Nitro types for node context#305
harlan-zw merged 1 commit into
mainfrom
fix/304-nuxt-node-route-rule-types

Conversation

@harlan-zw

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Resolves #304

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Nuxt 4 reads routeRules types for nuxt.config.ts through the node type context. nuxt-robots-nitro.d.ts was only emitted for Nuxt and Nitro, so routeRules.robots still failed TS2353 in config files.

Register the Nitro type template with node: true and add a unit regression for that template option.

@pkg-pr-new

pkg-pr-new Bot commented Jun 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxtjs/robots@305

commit: 2343db2

@harlan-zw harlan-zw merged commit fa83fed into main Jun 26, 2026
10 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.

routeRules.robots fails Nuxt 4 typecheck (TS2353): nuxt-robots-nitro.d.ts registered without node:true

1 participant