Repository navigation
Description
Which project does this relate to?
Router
Describe the bug
When Rspack is used and autoCodeSplitting is enabled, the source map generated does not match the original file. The issue is gone when autoCodeSplitting is disabled.
Your Example Website or App
Steps to Reproduce the Bug or Issue
- Add
debuggerstatement tosrc/routes/index.tsx - Use launch profile on VSCode
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
}
- Visit the site and check where it breaks
Expected behavior
The debugger should breaks at the exact point of the debugger statement.
Screenshots or Videos
Platform
- OS: Windows
- Browser: Chrome
- Version: 134.0.6998.118
Additional context
tanstack-router-react-example-quickstart-rspack-file-based@ D:\router\examples\react\quickstart-rspack-file-based
├── @rsbuild/[email protected]
├── @rsbuild/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @tanstack/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
Reacted by maroon1


Activity
schiller-manuel commentedon Mar 21, 2025
does this only appear with rsbuild? does vite work as expected?
wfjsw commentedon Mar 22, 2025
I tried Vite at the beginning with Stackblitz and it does not seem to suffer from that issue; but sourcemap does not even load there, so it might be different.
schiller-manuel commentedon Jun 18, 2025
@Muromi-Rikka how is the linked issue related?
Muromi-Rikka commentedon Jun 19, 2025
At that time, I thought this problem was related to this link, but in fact it wasn't. I will open a separate issue to report this problem.
LadyBluenotes commentedon Jul 11, 2026
We’ve made several source-map fixes in the code-splitting compiler since this was reported, including preserving the original route filename and source content in generated maps.
I can’t confirm whether the Windows VS Code breakpoint mapping still fails on the current Rsbuild/Rspack versions at the moment. Could you try the current
quickstart-rspack-file-basedexample again with a fresh reproduction and share the generated source map or breakpoint result if it still maps to the wrong line?