Skip to content

[turbopack] Add --no-hmr flag to next dev#95436

Draft
sampoder wants to merge 1 commit into
canaryfrom
sp/no-hmr/option
Draft

[turbopack] Add --no-hmr flag to next dev#95436
sampoder wants to merge 1 commit into
canaryfrom
sp/no-hmr/option

Conversation

@sampoder

@sampoder sampoder commented Jul 2, 2026 •

Copy link
Copy Markdown
Member

This is a prototype of the idea from the work ideas list:

  1. (M) Agents do not understand HMR flows
    • Solution: support pure ‘refresh to reload’ dev flow (no-HMR-mode)

Essentially, with the flag --no-hmr you have to reload the web page to see your updates. The idea being that this would give an agent certainty that they have the most up to date copy.

There might be a better way of stopping these hallucinations? Hopefully, having this though gives us something we can test with.

I'm keeping the websocket open and sending messages but we're just ignoring them on the client if they would change the page (eg. SERVER_COMPONENT_CHANGES)

@github-actions

github-actions Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Stats cancelled

Commit: 8eecf31
View workflow run

@github-actions

github-actions Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Failing test suites

Commit: 8eecf31 | About building and testing Next.js

pnpm test-dev-experimental-turbo test/e2e/app-dir/instant-validation/instant-validation.partial-prefetching.test.ts (job)

  • instant validation > dev - client navigation > invalid - static prefetch - missing suspense around search params (DD)
Expand output

● instant validation › dev - client navigation › invalid - static prefetch - missing suspense around search params

expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `instant validation dev - client navigation invalid - static prefetch - missing suspense around search params 1`

- Snapshot  - 24
+ Received  +  1

- {
-   "cause": [
-     {
-       "label": "Caused by: Instant Validation",
-       "source": "app/suspense-in-root/static/missing-suspense-around-search-params/page.tsx (1:24) @ instant
- > 1 | export const instant = {
-     |                        ^",
-       "stack": [
-         "instant app/suspense-in-root/static/missing-suspense-around-search-params/page.tsx (1:24)",
-         "Set.forEach <anonymous>",
-       ],
-     },
-   ],
-   "code": "E1403",
-   "description": "Next.js encountered link data during a navigation.",
-   "environmentLabel": "Server",
-   "label": "Instant",
-   "source": "app/suspense-in-root/static/missing-suspense-around-search-params/page.tsx (7:18) @ Page
- >  7 |   const search = await searchParams
-      |                  ^",
-   "stack": [
-     "Page app/suspense-in-root/static/missing-suspense-around-search-params/page.tsx (7:18)",
-   ],
- }
+ "Redbox did not open."

  660 |         )
  661 |         if (partialPrefetching) {
> 662 |           await expect(browser).toDisplayCollapsedRedbox(`
      |                                 ^
  663 |            {
  664 |              "cause": [
  665 |                {

  at Object.toDisplayCollapsedRedbox (e2e/app-dir/instant-validation/instant-validation.test.ts:662:33)

@sampoder sampoder changed the title Add --no-hmr flag to next dev (Turbopack) [turbopack] Add --no-hmr flag to next dev Jul 2, 2026
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.

1 participant