Unexpected Behavior with Monkey Patch from PR #54752 causing Double Encoding of Dynamic Segments #57829
Closed
1 task done
Labels
bug
Issue was opened via the bug report template.
linear: next
Confirmed issue that is tracked by the Next.js team.
locked
Link to the code that reproduces this issue
https://github.com/jianliao/nextjs-webpack-double-encoding
To Reproduce
Test Routing
Current vs. Expected behavior
The application crashed and below error pops up:
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
App Router
Additional context
Here is a quick codesandbox for reproduction.
In the recent merge of Pull Request #54752, a monkey patch was introduced to the Next.js embedded webpack configuration. This patch is found to behave unexpectedly when a
beforeInteractive
script is part of the project. Particularly, the code within app-webpack.ts at lines 18 and 38 is triggered, which in turn causes a double encoding issue with dynamic segments such as [slug]. This double encoding prevents the development server from correctly loading the JavaScript file associated with the dynamic segment.NEXT-1707
The text was updated successfully, but these errors were encountered: