I want to use this plugin
addSbtPlugin("net.ground5hark.sbt" % "sbt-concat" % "0.1.8")
To concatenate my assets.
I have 3 groups :
Concat.groups := Seq(
"concat_main.css" -> group(Seq(
"stylesheets/bootstrap.min.css",
"stylesheets/font-awesome.css",
"stylesheets/totem/sidebar/component.css",
"stylesheets/main.min.css"
)),
"concat_main.js" -> group(Seq(
"javascripts/jquery-2.1.0.min.js",
"javascripts/bootstrap.min.js",
"javascripts/totemPage/sidebar/modernizr.custom.js",
"javascripts/totemPage/respond.min.js",
"javascripts/totemPage/html5shiv.js",
"javascripts/totemPage/sidebar/classie.js",
"javascripts/main.js"
)),
"concat_noel.js" -> group(Seq(
"javascripts/totemPage/ouibounce-modal.js",
"javascripts/ouibounce_modal.js",
"javascripts/homePage.js",
"javascripts/totemPage/jquery.cookie.js",
"javascripts/embed.js"
))
)
Concat.parentDir := "public/main/javascripts"
pipelineStages in Assets := Seq(concat, uglify, digest, gzip)
Files are generated in dev, I can access
<link rel="stylesheet" href="@routes.Assets.versioned("javascripts/concat_main.css")">
<script src="@routes.Assets.versioned("javascripts/concat_main.js")" type="text/javascript"></script>
But with activator start I have a 404.
At the sbt-web documentation you can read that:
And this is what you have done which is setting the
pipelineStageskey scoped to the Assets configuration. However, this works only for the development mode. In order to run the pipeline in the production mode you have to set thepipelineStageskey scoped to the Global configuration. In your case this will look like this: