Disallow `prerender: true` route rule for route rules having `*`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 899
- Avg merge
- 2d 24m
- Merged PRs (30d)
- 40
Description
(context: from chat with @JamieCurnow)
We only support prerender: true for static route rules and omit the rest. (source: https://github.com/unjs/nitro/blob/7a6c61dbd1453e7bef69f999d0325881f901e8f6/src/prerender.ts#L32)
Using typescript, could be nice to make it clear.
routeRules: {
'/**': { prerender: true }, // invalid
'/blog/**': { prerender: true }, // invalid
'/blog/test': { prerender: true }, // valid
},
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/prerender.ts around line 32, where non-static route rules are currently omitted, and trace the TypeScript types used for routeRules. Confirm the behavior for wildcard and static examples in the issue, then run the relevant existing checks or tests. Done means wildcard prerender rules are rejected or clearly marked invalid while /blog/test remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100