Sourcemaps?
Closed this issue · 3 comments
Hey, thanks for putting together this example! I'm curious if you know how to get sourcemaps working?
Hi @psylinse , thanks for coming by :)
I just pushed an update to this repo (it was quite outdated) and enabled the source maps in both build.sbt
and snowpack.config.js
,
and looks like the browser dev tools are now detecting the source maps.
(also, in terms of laminar/frontroute functionality you might find this example more useful: https://github.com/yurique/laminar-vite2-example)
Awesome, thank you!
Does the vite example do sourcemaps as well? Also, do you recommend vite over snowpack?
Sorry, thanks for answering my questions, new to this level of configuration for a frontend project.
No worries. Frontend tooling configuration is indeed complicated (at least until you get used to it) :)
I do like vite more than snowpack, but haven't been using either of them much, though only because currently scala.js can't optimize the size of the .js when emitting ES modules (scala-js/scala-js#3893).
As for the source maps – in the vite example they are disabled on the scala.js side (in build.sbt
). For some reason vite fails if they are enabled. I'm yet to find an opportunity to investigate it (it might be just a matter of configuring something; or maybe a bug somewhere).