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
Shorten sourceURLs #6
Comments
a while ago this did work in chrome (i'm using it too) but some change in chrome changed it... You need to check "Show script folders" in chrome dev tool settings (bottom right corner). |
Now it's working, thanks. I've checked the "Show script folders" already. But I was annoyed that the folders also start with the full absolute path. |
Compare these two paths from browserify and webpack:
The first path provides a much nicer debug experience (e.g. in stack traces, etc.) since it omits the uninteresting parts. |
sourceUrl is shortened the way stats was processed.
|
Looks good. But if I'm using a loader, such as bundle, the loader-path is prepended. For instance:
Is this intended? I don't think that the loader is important for the debug view. |
It's intended and importent. The bundle loader is a good example. If you use the bundle loader you have 2 modules included
If we would not prepend the loader the module names are not unique and would collide. |
Sounds reasonable. |
Why do all source URLs start with
webpack-module://
and than include the absolute file path? I think it would be more readable to just include the path after the module root. E.g. the file/home/jhnns/node/myModule/lib/printHello.js
would appear asmyModule/lib/printHello.js
.Currently I'm using Chrome to debug my scripts and it's kind of annoying to always resize the scripts panel to see how the actual filename is (because of the webpack-module prefix and the absolute path the string is quite long).
Despite of that, could you add to the readme that the debug option is also available when using the programmatic interface?
The text was updated successfully, but these errors were encountered: