-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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(remix-dev): fix linked sourcemap to enabled breakpoints for debugging #2065
Conversation
Hi @kiliman, Welcome, and thank you for contributing to Remix! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
Do the inline once with the inclusion of "source-map-support" in @remix-run/node not work for you? |
It works fine for getting the correct stacktrace. But the issue is that your synthetic "route" module is adding the I switched back to "linked" sourcemaps vs "inline" because it was simpler. I didn't have to decode the base64 and back again. Also, I think having external sourcemaps will reduce the server bundle, especially when Cloudflare Workers is already complaining about hitting some limit. |
should/could the client bundle sourcemaps get a similar treatment? my error page is working fine with the server bundle now, but is confused about: It isn't superhard to reverse engineer the original callsite from this with a sourcemap lib and some clever regex. but if the client side errors could give me a stacktrace that is pointing to tsx files just like with the server bundle would be awesome and save me a bunch of work :D to illustrate: server error
client error
(this is in 1.2.2 btw, just saw that 1.2.3 is released, gonna update soon) |
@jacob-ebey Any update if this PR will be merged? |
48cecdc
to
419e242
Compare
I've rebased my branch to latest |
@chris-kruining please open a new issue for what you're reporting 🙏🏼 |
There are 2 issues with linked sourcemaps for server build: 1) sourceMappingURL uses absolute path /build 2) map file uses route: prefix in route modules so breakpoints are not found This PR fixes both issues so sourcemap debugging works properly.
b14c885
to
748d23b
Compare
BTW: I think updating the contributors.yml file should be done automatically after the PR is merged. It's very hard to keep the PR updated as the contributors file is constantly being modified. |
we thought about a few different ways to do this instead (form on the website for example), but the problem with doing it after the PR is if you don't end up signing and we merged your work already, and we can't just assume you signed if you got your PR merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! I started to tinker with this a bit ago, but never got around to opening a PR for it, so thanks again 🙏
can you take a look as well @jacob-ebey
🤖 Hello there, We just published version Thanks! |
…ging (remix-run#2065) Co-authored-by: Jacob Ebey <jacob.ebey@live.com>
There are 2 issues with linked sourcemaps for server build:
This PR fixes both issues so sourcemap debugging works properly.
Closes #367