jspm-cli: [0.17.0-beta.44] source map has problem ! can't debug ! (0.17.0-beta.42 is okay !! )
JSPM Version: 0.17.0-beta.44
Transpiler Plugin(s): babel
Details: source map has problem ! can’t debug ! (0.17.0-beta.42 is okay !! )
command jspm bundle <%= pkg.source %> web/debug/build.js -d --config jspm.build.json --inject
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 26 (2 by maintainers)
Thought so - I’ll prepare a pull request to fix this tomorrow 😃
The previous pull requests were to fix a couple of different issues, one of which was an issue, where if you bundled files that had already been transpiled, and thus already had accompanying source map files, then any root-relative source paths in those source maps would become messed up. Basically, if you already have a source map file with root-relative source paths, then it should just use those as-is.
Your scenario is a bit different, as you are using the built in transpiler, and that use case seemed to work correctly before my pull requests. Hopefully this will be the last issue with this though - I tested it pretty thoroughly last time - just didn’t realize the behavior was different on UNIX.
I’ve reproduced the issue using the example provided by @shaoahs, and as suspected, it was caused by that last
path.isAbsolute
in my previous pull request.Additionally, the use of
path.normalize
did not take into account that it might be looking at a file URL, causing it to incorrectly remove two of the/
characters infile:///
.The pull request fixes both of those issues - sorry for the inconvenience.