I ran into a problem of reading a file in unmanagedResourceDirectories
generated by Webpack in production mode. Given the following snippet:
val manifest: Try[JsValue] = Try(Json.parse(
Source.fromFile(new File("/public/manifest.json")).getLines.mkString
))
I want to read sth like /public/manifest.json
.
I manage to find the solution for it. Add this to
build.sbt
And I can have sth like this in code: