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 (remix-serve): convert file url to path when loading source maps #8321

Merged
merged 4 commits into from
Dec 18, 2023

Conversation

VHall1
Copy link
Contributor

@VHall1 VHall1 commented Dec 18, 2023

This PR fixes an issue where the leading slash on source map paths would cause remix-serve to crash when an error gets thrown on Windows.

Tested both on Windows and Mac.

Closes: 8309

Copy link

changeset-bot bot commented Dec 18, 2023

🦋 Changeset detected

Latest commit: 899e6b7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@remix-run/serve Patch
@remix-run/dev Patch
create-remix Patch
remix Patch
@remix-run/architect Patch
@remix-run/cloudflare Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
@remix-run/css-bundle Patch
@remix-run/deno Patch
@remix-run/eslint-config Patch
@remix-run/express Patch
@remix-run/node Patch
@remix-run/react Patch
@remix-run/server-runtime Patch
@remix-run/testing Patch

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

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Dec 18, 2023

Hi @VHall1,

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 CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected].

Thanks!

- The Remix team

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Dec 18, 2023

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@kiliman
Copy link
Collaborator

kiliman commented Dec 18, 2023

Ugh. I should have tested my "fix" on Windows.

Seems like something that source-map-support should automatically handle.

I verified that url.fileURLToPath() works correctly on macOS and Windows. It even ignores the search param.

Thanks for fixing this.

@kiliman kiliman self-requested a review December 18, 2023 14:58
Copy link
Contributor

@brophdawg11 brophdawg11 left a comment

Choose a reason for hiding this comment

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

Thanks!

@brophdawg11 brophdawg11 reopened this Dec 18, 2023
@brophdawg11
Copy link
Contributor

Sorry for the accidental close - commented/closed this thinking I was on a different PR 🤦

@kiliman
Copy link
Collaborator

kiliman commented Dec 18, 2023

Ha, yeah. @brophdawg11 this fixes the source-map issue from the previous PR but now works on Windows (yeah, I should have tested it on Windows, primarily since it's path-related 😳)

@brophdawg11 brophdawg11 merged commit 837d843 into remix-run:dev Dec 18, 2023
9 of 10 checks passed
@brophdawg11 brophdawg11 linked an issue Dec 18, 2023 that may be closed by this pull request
Copy link
Contributor

🤖 Hello there,

We just published version 2.4.1-pre.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

🤖 Hello there,

We just published version 2.4.1 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@VHall1 VHall1 deleted the vhall1/fix-source-map-loading branch January 7, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error related to sourcemaps in production build
3 participants