You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The source-mapping should enable the chrome-dev-tools to show .scala source files.
In firefox this works as expected. However in chromium inspecting a .scala file results in the following error message being shown instead of the source file:
Could not load content for http://localhost:12345/src/main/scala/webapp/Main.scala (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)
What's interesting to note is that following the link to the .scala file results in the file being downloaded instead of being displayed. Maybe there are some faulty http headers at fault?
I tested this on the current branch of the outwatch/seed.g8 project and chromium Version 98.0.4758.102
The text was updated successfully, but these errors were encountered:
Investigating further, turns out .scala files are served with the Content-Type: application/octet-stream mime type instead of application/javascript or similar, which causes chrome to try to download them.
Webpack dev server allows for mime types to be extended using https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware , however I have not yet been successful in adding that.
Do you perhaps know if it is possible to get more verbose output from webpack while it is being ran by sbt?
Investigating further, turns out .scala files are served with the Content-Type: application/octet-stream mime type instead of application/javascript or similar, which causes chrome to try to download them.
Interesting thought! I had issues with this "default" content-type before somewhere else. What would be the correct content type for scala files by the way? Text? 🤔
Do you perhaps know if it is possible to get more verbose output from webpack while it is being ran by sbt?
Not inside sbt, but when running webpack directly. It would be something like this:
The source-mapping should enable the chrome-dev-tools to show .scala source files.
In firefox this works as expected. However in chromium inspecting a .scala file results in the following error message being shown instead of the source file:
What's interesting to note is that following the link to the .scala file results in the file being downloaded instead of being displayed. Maybe there are some faulty http headers at fault?
I tested this on the current branch of the outwatch/seed.g8 project and chromium Version 98.0.4758.102
The text was updated successfully, but these errors were encountered: