-
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-routes not transforming source maps #8970
Fix remix-routes not transforming source maps #8970
Conversation
🦋 Changeset detectedLatest commit: 75f28ce The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Hi @IgnusG, 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 |
7aa3c4c
to
de4fd54
Compare
de4fd54
to
475e835
Compare
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
Verified the fix on the default template's |
2f99114
to
75f28ce
Compare
Thanks for the fix @IgnusG ! 🙏 |
Closes #8453
Testing Strategy:
I tested the previously missing source map functionality locally on my project. Unfortunately I'm not quite sure how to add actual tests into the integrations. I tried a few attempts but I could use some guidance on this 🙏
Here's some more context on why I believe this plugin requires source map support while it transforms code (as pointed out by @pcattori in his comment)
In the above is a preview of the vite-inspect-tool showing changes the plugin made to the code. As you can see some lines are removed and shifted around making its source maps point to the wrong line after mapping. This small change adds the parameters needed for generating the source map to the
removeExports
function (based on some other plugins inside the plugin file) and passes them back to rollup along with the code.