I want to minify my self written javascripts in Play Framework 2.3.10. I started putting all my scripts to app/assets/javascripts/*. Additionally i added the following route in conf/routes:
GET /assets/v/*file controllers.Assets.versioned(path="/public", file: Asset)
I added the following lines to enable minification with uglify and digest. to plugins.sbt:
addSbtPlugin("com.typesafe.sbt" % "sbt-uglify" % "1.0.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0")
and to build.sbt:
pipelineStages in Assets := Seq(uglify, digest)
Everything works like a charm. When i am requesting the website in my browser i see the minified javascript file (.min.js) and also the normal (source) javascript file (.js). The problem is that there is a source map generated and attached to the minified javascript. It links to the source file. How can i avoid that? Is it possible to hide / deny access to the source javascript files so that a user can just request the minified version ( even when trying to access the source file via direct url [ e.g. mypage.de/assets/v/javascripts/script.js ] ) ?
Thanks in advance, Rob