I am trying to compile * .less resources from my directory assets/stylesheets/. I have one file contained in this directory, which masterpage.less.
I added the sbt plugin for less
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.6")in my file plugins.sbt.
Reproduction documentation says:
Compiled assets on Play must be defined in the app / assets directory. They are handled by the build process, and LESS sources are compiled into standard CSS files. The generated CSS files are distributed as standard resources into the same public / folder as unmanaged assets, which means that there is no difference in how you use them after compilation.
What I do, so I'm confused about why my resources are not compiled into public/
Here are the routes I have:
GET /assets/*file controllers.Assets.at(path="/public", file)
GET /vassets/*file controllers.Assets.versioned(path="/public", file: Asset)
GET /webjars/*file controllers.WebJarAssets.at(file)
This is how I try to link the css page in my html file:
<link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/masterpage.css")"/>
and finally, here is the error I get in the console:
GET http://localhost:9000/assets/masterpage.css
source
share