forked from huntc/sbt-uglify
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
I'd like to combine multiple unminified .js files, then minify the combined file and place it in the webapps's public/js/main.min.js. I also want to ignore all WebJars JavaScript because those files are already minified.
I tried this:
pipelineStages := Seq(rjs, uglify, digest, gzip)
UglifyKeys.uglifyOps := { js =>
Seq((js.sortBy(_._2), "main.min.js"))
}
However all .js files, including previously minified .js files, were combined, which takes forever.
I then tried adding this:
excludeFilter in uglify := GlobFilter("*.min.js")
But main.min.js now just contains:
define("main",function(){});
//# sourceMappingURL=main.js.map
Once I get this test project working, I will try it on my production app, which has dozens of JS files in various subdirectories under public/. Hopefully the solution won't require a manual listing of every .js file.
Metadata
Metadata
Assignees
Labels
No labels