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

Add source map samples #2339

Merged
merged 1 commit into from
Jan 24, 2022
Merged

Add source map samples #2339

merged 1 commit into from
Jan 24, 2022

Conversation

mstoykov
Copy link
Contributor

No description provided.

@github-actions github-actions bot requested review from na-- and oleiade January 17, 2022 12:22
@mstoykov mstoykov requested a review from yorugac January 17, 2022 12:44
@oleiade
Copy link
Member

oleiade commented Jan 17, 2022

Nice! This is sure going to help with #2340. Could you give me a bit of context to the context in K6 in which this would be useful? My understanding of SourceMaps is that they're essentially a mechanism allowing to map from minified code, to its original source, correct?

@mstoykov
Copy link
Contributor Author

mechanism allowing to map from minified code,

if you replace "minified" with "transformed" you are there.

For k6 specifically as we still use babel internally we do transform code that supposedly k6 "supports", which is what the issue_1804 is showing. The other one is showing an embeded source map(The last line in test1.js) generated by tsc, babel and webpack. It also happens that the particular example still needs the k6 internal babel. So that sourcemap does actually go through the internal babel and it returns a "combined" map that gets you back (somewhat) to the original sourcecode, which is test1.ts.

@na-- na-- added this to the v0.37.0 milestone Jan 24, 2022
@mstoykov mstoykov merged commit 34f899c into master Jan 24, 2022
@mstoykov mstoykov deleted the sourceMapsExamples branch January 24, 2022 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants