You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your project's build file also needs to enable sbt-web plugins. For example with build.sbt:
lazyvalroot= (project in file(".")).enablePlugins(SbtWeb)
As with all sbt-web asset pipeline plugins, you must declare their order of execution. For example:
pipelineStages :=Seq(htmlMinifier)
Options
The plugin is configured with sensible defaults, but can be customized to meet individual requirements. Most of the
same configutation options used by the html-minifier package may be specified. For example, to disable comment
stripping:
HtmlMinifierKeys.removeComments :=false
See the html-minifier home page for information on available options.
File Filters
By default, the plugin scans the assets directory for any file ending in .htm or .html and creates new minified
versions of those files. The files to be processed can be filtered using the includeFilter and excludeFilter settings.
For example, to limit minification to just .tpl.html template files:
includeFilter in htmlMinifier :="*tpl.html"
Prerequisites
The plugin requires that your project have the html-minifier Node module install. The easiest way to do this is to
include a package.json file at the root of your project:
{
"dependencies": {
"html-minifier": "^0.6.3"
}
}
About
sbt-web plugin that adds HTML minification using html-minify