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]: ConcatenateModules optimization affect on sourcemaps #6709

Closed
mrakobes27 opened this issue Jun 3, 2024 · 5 comments
Closed

[Bug]: ConcatenateModules optimization affect on sourcemaps #6709

mrakobes27 opened this issue Jun 3, 2024 · 5 comments
Assignees
Labels
bug Something isn't working need reproduction

Comments

@mrakobes27
Copy link

System Info

System:
OS: Windows 10 10.0.19044
CPU: (8) x64 AMD Ryzen 7 5700G with Radeon Graphics
Memory: 8.30 GB / 19.52 GB
Binaries:
Node: 18.19.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (123.0.2420.97)
Internet Explorer: 11.0.19041.1566
npmPackages:
@rspack/cli: 0.6.5 => 0.6.5
@rspack/core: 0.6.5 => 0.6.5
@rspack/plugin-minify: 0.6.5 => 0.6.5
@rspack/plugin-react-refresh: 0.6.5 => 0.6.5

Details

When enabled "concatenateModules" optimization "sourcemaps" are broken
(offsets of original sourcemaps of concatenated js-modules are not recalculated).

When disabling this optimization, the sourcemaps are generated correctly (I checked it through the sourcemaps visualizer - https://sokra.github.io/source-map-visualization/#custom)

Reproduce link

No response

Reproduce Steps

sourcemapsBug
In the source code where you can check the operation of the "concatenateModules" optimization, try to enable/disable this option, and make sure that in one case the "sourcemaps" are formed correctly, and in the other they are not (including the impossibility of setting a breakpoint)

@mrakobes27 mrakobes27 added bug Something isn't working pending triage The issue/PR is currently untouched. labels Jun 3, 2024
@JSerFeng JSerFeng self-assigned this Jun 3, 2024
@mrakobes27
Copy link
Author

Moreover, even if the "concatenation" is performed on one module (out of many existing ones), the source maps are broken for all subsequent code in the bundle.

@JSerFeng
Copy link
Collaborator

JSerFeng commented Jun 4, 2024

Can you give me a reproduce repo ? I tried a easy demo seems fine here:

image

Copy link
Contributor

github-actions bot commented Jun 6, 2024

Hello @mrakobes27, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction will be closed if no activities in 14 days.

@jerrykingxyz jerrykingxyz removed the pending triage The issue/PR is currently untouched. label Jun 11, 2024
@SyMind
Copy link
Member

SyMind commented Jun 25, 2024

@mrakobes27 @JSerFeng Maybe fixed in #6793

Copy link
Contributor

Since the issue was labeled with need reproduction, but no response in 14 days. This issue will be closed. Feel free to comment and reopen it if you have any further questions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need reproduction
Projects
None yet
Development

No branches or pull requests

4 participants