Hard Navigation In Pages Router Dev Mode When Custom assetPrefix is Applied #77241
Labels
linear: next
Confirmed issue that is tracked by the Next.js team.
Linking and Navigating
Related to Next.js linking (e.g., <Link>) and navigation.
Pages Router
Related to Pages Router.
Link to the code that reproduces this issue
https://github.com/mgreenw/next-pages-router-asset-prefix-hard-nav-repro
To Reproduce
Current vs. Expected behavior
Current:
assetPrefix
applied/custom-asset-prefix/_next/static/chunks/pages/page2.js
. This request results in a 404Expected:
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6020 Available memory (MB): 32768 Available CPU cores: 12 Binaries: Node: 20.14.0 npm: 10.7.0 Yarn: 1.22.19 pnpm: 9.7.0 Relevant Packages: next: 15.2.3 // Latest available version is detected (15.2.3). eslint-config-next: N/A react: 19.0.0 react-dom: 19.0.0 typescript: N/A Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Linking and Navigating
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
Related issue:#63623
App Router-only fix: #63627
This seems to be a Webpack-only issue. I wasn't able to repro with Turbopack.
The text was updated successfully, but these errors were encountered: