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
I had no luck finding an obvious solution using Parcel, but I did have some success with webpack 5, using the scalajs-friendly-source-map-loader webpack plugin.
However you can't use it with the dev server because it complains about paths, you have to build it, and run a static server from the dist folder. Speculate that it might work in webpack 4 maybe? The path warnings seem to be a new thing, but what do I know?
In the screenshot below, you can see a tyrian app, running an embedded indigo game, and the profiler is merrily telling us that this bit of the code came from GameLoop.scala:53:4.
Clicking on the hyperlinked GameLoop.scala:53:4 will show you the real Scala code, and give you the times spent in running the code there.
Webpack is a lot more hassle than Parcel however, and the experience was far from smooth. So it needs another attempt. It may even be worth writing a Parcel plugin?
I suspect all that's happening is that parcel keeps moving things around during the build and the browser can't keep up.
There's some suggestion here that we might be able to tell parcel where to look - but my initial stab at this wasn't very fruitful.
https://parceljs.org/features/targets/#sourcemap
The text was updated successfully, but these errors were encountered: