Exclude sourcemaps
lespea opened this issue · 2 comments
Sorry if this is another stupid question but is it possible to exclude the sourcemap files that are generated? I'm using play-scalajs-sourcemaps which is nice because it hides them in prod but upon further investigation it looks like the .map files generated from scalajs are still present and accessible when the server is running.
I'm pretty new to the whole scalajs thing so it's probably just a config i'm not seeing.
Hi, Scala.js generates the SourceMap files. In the jsSettings, you can set the emitSourceMaps
setting key to false for fullOptJs
:
lazy val playScalaJS: CrossProject = PlayScalaJS("example", file(".")).
jsSettings(emitSourceMaps in fullOptJS := false)
The *opt.js.map
file won't be emitted for prod while the *fastopt.js.map
file will still be emitted for dev. Make sure to do a clean
before a start
, stage
or dist
and you will not see it in your browser's console.
Great thanks for the info. Sorry if this was obvious.