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

fix: source maps to work correctly #51

Merged
merged 7 commits into from
Aug 1, 2023
Merged

fix: source maps to work correctly #51

merged 7 commits into from
Aug 1, 2023

Conversation

bmichalski
Copy link
Contributor

Hi,

I was experimenting with this nice tool of yours but I could not manage to get a usable stack trace by following the instructions of the README.md at How do I enable source-maps?.

Here's my attempt at fixing this issue :)

This PR replaces source-map-support with the more up to date @cspotcode/source-map-support fork.
See this issue on Github for the differences between the two.

It also adds a dependency to source-map-url which I use to parse the compiled sources to get the URL of the source map file.

This PR also includes tests for different source map types.

}

return null;
},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests seem to pass when removing this entire retrieveSourceMap function. Is it necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch :)
Indeed, tests are OK without it.
It might have been useful at some point in the development process but its no longer the case so it should be removed.
We can also remove direct dependency to source-map-url.

@privatenumber
Copy link
Owner

Great PR! Thanks for contributing.

@@ -41,9 +41,9 @@
"webpack": "4 || 5"
},
"dependencies": {
"@cspotcode/source-map-support": "^0.8.1",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me how this fork is different from the original source-map-support so I'm going to revert this.

NVM just saw the issue you linked!

@privatenumber privatenumber changed the title fix: fix support for source-map fix: source maps to work correctly Aug 1, 2023
@privatenumber privatenumber merged commit aee9a7e into privatenumber:develop Aug 1, 2023
4 checks passed
@privatenumber
Copy link
Owner

🎉 This PR is included in version 1.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants