-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Support sourcemaps #985
Comments
This is what I got https://github.com/stereobooster/sourcemapped-stacktrace-node#example. It is highly experimental, but works in my case |
Well, I consider this suitation as well. I generator the dist files and sourcemap files seperately by webpack. I didn't want to put the sourcemap files to the server.Because it's not safe. I try to inject the sourcemap files to the browser through puppeteer locally.But puppeteer can only inject the script or stylesheet. I think it can inject the script with inline sourcemap to solve this problem. |
This is security through obscurity. The ticket is not about how you put sourcemaps or if you want to use them. This ticket is about situation when you have sourcemaps and want use it to decode errors - the same way as chrome console does it. |
Supporting sourcemaps will:
I don't think this is a good trade-off.
I'm not sure what kind of documentation is required; if you have any ideas, I'd be happy to review a pull request. |
I know this is closed but it might be useful for someone to know how I managed to get a meaningful stacktrace - see my answer here on SO https://stackoverflow.com/a/48806685/1384149 |
It would be great if there was a way to see JavaScript coverage when using source maps. I'm currently working on a project where I have to use Webpack (at least for now) and I want to run tests using Puppeteer and check the code coverage for each file in the bundle. |
@richardkazuomiller did you find anyway to get code coverage from sourcefiles? |
@richardkazuomiller have you found solution for mapping coverage to source? |
Has anyone come up with a workaround for this? I'm thinking of loading them directly in my application but I really didn't want to go about it that way. Currently I'm compiling some typescript and evaluating the compiled JS (with inline source maps) but this doesn't work 😅 Using |
I have following code in my small crawler
to track if something goes wrong. And get this output:
which is not very helpful.
I report this issue here because, I believe there should be standard way to deal with sourcemaps. Even if it will not be a part of puppeteer, it should documented in puppeteer.
Possible solution is to use https://github.com/novocaine/sourcemapped-stacktrace or something similar.
Thanks for open sourcing this project.
The text was updated successfully, but these errors were encountered: