nitrojs / nitrojs/nitro

ISR route in dev mode

Open
#2,624 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug v2
Dominant language
TypeScript
Stars
11.2k
Forks
899
Avg merge
2d 24m
Merged PRs (30d)
40

Description

Environment

Stackblitz

Reproduction
  1. Open the StackBlitz
  2. Refresh the page
  3. See that the date changes and ISR-like behavior ("cached" route) is not the case
Describe the bug

When using ISR in dev mode, I'd expect the route to behave like "static"/like a cached route instead of not being cached at all, to mimic the ISR rule in prod as good as possible (or even better, having a "native" ISR feature in the future).

Right now, the ISR page is refreshing and not cached at all during dev mode, possibly confusing people if ISR is behaving correctly

Additional context

No response

Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by opening the linked StackBlitz reproduction and inspect server/routes/index.ts and nitro.config.ts. Reproduce the repeated-refresh behavior in dev mode, then trace the relevant dev-mode route handling. Done means the ISR route behaves like a cached or static route during development instead of changing on each refresh, while preserving the reported production intent.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.