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

Link source maps to raw.githubusercontent.com #101

Merged
merged 1 commit into from
Dec 3, 2017

Conversation

fdietze
Copy link
Member

@fdietze fdietze commented Nov 24, 2017

I saw this interesting snippet in build.sbt and thought , that it might be useful for debugging. But I wasn't able to verify that its working.

@mariusmuja
Copy link
Collaborator

Nice! But I think it should be:

-  val a = baseDirectory.value.toURI.toString.replaceFirst("[^/]+/?$", "")
+  val a = baseDirectory.value.toURI

Copy link
Member

@LukaJCB LukaJCB left a comment

Choose a reason for hiding this comment

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

👍

@fdietze
Copy link
Member Author

fdietze commented Nov 25, 2017

I cannot find any relevant url in the source-map files. I think this is for source-maps from scalaJS itself, but bundler does not adopt it yet.

@mariusmuja
Copy link
Collaborator

The urls are in the .sjsir files and I verified that the bundler includes them in the .map files.

@fdietze fdietze force-pushed the fix-source-maps branch 2 times, most recently from f3d4927 to a7294b9 Compare December 3, 2017 17:39
@fdietze
Copy link
Member Author

fdietze commented Dec 3, 2017

I now included the current git hash in the URL, which should always load the correct source file.
I tested this successfully with chromium, which now shows the source file when debugging.

Try it with this dependency:

"com.github.fdietze" % "outwatch" % "3f5cd8e"

I suggest that other libraries use this approach as well.

@mariusmuja mariusmuja merged commit 6d31a29 into outwatch:master Dec 3, 2017
@fdietze fdietze deleted the fix-source-maps branch March 11, 2018 11:29
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.

None yet

3 participants