You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the paths used are the ones from the sourcemap of the module.
A potential fix would be in packages/react-scripts/config/webpack.config.js, with the following patch:
--- webpack.config.js+++ webpack.config.js_potential-fix@@ -484,7 +484,7 @@
// Babel sourcemaps are needed for debugging into node_modules
// code. Without the options below, debuggers like VSCode
// show incorrect code and set breakpoints on the wrong lines.
- sourceMaps: shouldUseSourceMap,+ sourceMaps: false,
inputSourceMap: shouldUseSourceMap,
},
},
@justingrant : I feel like you are the right person to comment on this issue since you authored #7022 🙏
The text was updated successfully, but these errors were encountered:
The sourcemap points to the original source of the external library (zxcvbn), which are included in the NPM package, so we have them. I don't know if they are always included though… but that would probably be an other issue (potentially an issue to report to the external library itself).
So I'm closing this issue: I'm not really sure that #8071 is a duplicate, but the workaround offered there does fix my issue. I guess that the real fix would solve the issue as well. If anyone disagrees, I can always reopen the issue.
Describe the bug
Since #7022, I noticed that the generated sourcemaps corresponding to some modules having wrong relative paths in the
sources
part of the sourcemap.Did you try recovering your dependencies?
Yes, I also created a new CRA from scratch.
Which terms did you search for in User Guide?
sourcemap
Environment
Steps to reproduce
To reproduce:
zxcvbn
(yarn add zxcvbn
)yarn build
)build/static/js/2.cd57ecb1.chunk.js.map
)As you can see, the source of the files of the zxcvbn module are not good (they do not refer
node_modules
)Note that I used zxcvbn, but some other modules are impacted, for example typesafe-actions.
Expected behavior
Same as before #7022:
Actual behavior
Possible fix / thoughts
It seems that the paths used are the ones from the sourcemap of the module.
A potential fix would be in
packages/react-scripts/config/webpack.config.js
, with the following patch:@justingrant : I feel like you are the right person to comment on this issue since you authored #7022 🙏
The text was updated successfully, but these errors were encountered: