Skip to content

[Bug]: manifest.ts breaks HMR in Next.js 16.2 #91981

@abhishekmardiya

Description

@abhishekmardiya

Link to the code that reproduces this issue

https://github.com/abhishekmardiya/hmr-cache-breakage-reproduction.git

To Reproduce

Using a manifest.ts file in Next.js 16.2 causes Hot Module Replacement (HMR) to stop working correctly.

After making code changes:

  • HMR is not triggered
  • UI does not update
  • Even a hard reload (Cmd + Shift + R) does not reflect the latest changes

The only way to see updates is by deleting the .next build folder, after which the changes appear correctly.


Steps to Reproduce

  1. Create a Next.js app using version 16.2
  2. Add a manifest.ts file (App Router setup)
  3. Start the development server (next dev)
  4. Make any UI or code change

Current vs. Expected behavior

Expected Behavior

  • HMR should trigger automatically
  • UI should reflect the latest changes instantly
  • Hard reload should always fetch the latest code

Current Behavior

  • No HMR updates occur
  • UI remains stale even after hard reload
  • Changes only appear after deleting .next and restarting

Provide environment information

Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.4.0: Thu Mar 19 19:33:09 PDT 2026; root:xnu-12377.101.15~1/RELEASE_ARM64_T8112
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 24.14.1
  npm: 11.11.0
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.2.1 // Latest available version is detected (16.2.1).
  eslint-config-next: N/A
  react: 19.2.4
  react-dom: 19.2.4
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

This issue did not occur before Next.js 16.2

  • Removing manifest.ts restores normal HMR behavior
  • Tested with the latest canary version (16.2.1-canary.10) as well — the issue still persists

@wbinnssmith

Metadata

Metadata

Assignees

No one assigned

    Labels

    TurbopackRelated to Turbopack with Next.js.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions