Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unable to debug when lazyload. #8021

Open
belizariogr opened this issue Sep 24, 2024 · 6 comments
Open

[Bug]: Unable to debug when lazyload. #8021

belizariogr opened this issue Sep 24, 2024 · 6 comments

Comments

@belizariogr
Copy link

Version

System:
    OS: Windows 11 10.0.22631
    CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor
    Memory: 17.85 GB / 31.21 GB
  Browsers:
    Edge: Chromium (127.0.2651.105)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @rsbuild/core: ^1.0.6 => 1.0.6
    @rsbuild/plugin-react: ^1.0.2 => 1.0.2
    @rsbuild/plugin-svgr: ^1.0.2 => 1.0.2
    @rsbuild/plugin-type-check: ^1.0.1 => 1.0.1

Details

Using version 1.0.x we are unanble to debug when files has more than 50 lines. If I downgrade to version 0.7.x the debug works perfectly.

Reproduce link

https://github.com/belizariogr/rsbuild-error

Reproduce Steps

Run:
npm install

go to file: src/pages/Dashboard/index.tsx and try to debug in the last lines, just like the picture.

Captura de tela 2024-09-24 155203

@belizariogr
Copy link
Author

Just to add an information: The component is lazy loading just like in the picture down below...

The file responsable to load the page is: src/core/services/UserRouter/index.tsx

Captura de tela 2024-09-24 155716

@9aoy
Copy link
Collaborator

9aoy commented Sep 25, 2024

It seems to be related to the problem of rspack sourcemap. Try using rspack 1.0.0, the debug works perfectly. 😢

#7914

@9aoy
Copy link
Collaborator

9aoy commented Sep 29, 2024

Unfortunately this problem still exists in rspack v1.0.8. We still need to investigate further.

A bit of helpful information is that changing devtool from source-map to cheap-module-source-map works.

@9aoy 9aoy transferred this issue from web-infra-dev/rsbuild Sep 29, 2024
@elsassph
Copy link

elsassph commented Oct 2, 2024

We have the same problem.

I can confirm that cheap-module-source-map works for development, but not for production.

@penggang-home
Copy link

@belizariogr bro, Which theme did you use? Looks good

@belizariogr
Copy link
Author

I use https://mui.com/

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

No branches or pull requests

4 participants