Documentation Home

Resource Bundling

Configuration Variables

Turning on bundling

Property Default Value
bundle.enabled true

Turning on minification

Property Default Value
minify.enabled true

YUICompressor Javascript minification

Property Default Value
minify.linebreak -1
minify.munge true
minify.verbose false
minify.preserveAllSemiColons true
minify.disableOptimizations false

Google Closure Compiler Javascript minification

Property Default Value
minify.closure.compiler.languageIn ECMASCRIPT5
minify.closure.compiler.languageOut NO_TRANSPILE
minify.closure.compiler.warningLevel QUIET

note: all property defaults are production defaults. In development, bundling.enabled and minify.enabled are defaulted to false

Switching to Google Closure Compiler from YUICompressor

By default YUICompressor is used. In order to use Google Closure Compiler include the following in your project pom.xml

  <dependency>
      <groupId>com.google.javascript</groupId>
      <artifactId>closure-compiler</artifactId>
      <version>v20180204</version>
  </dependency>

note that Java 8 is required to use Google Closure Compiler

It's suggested to use Google Closure Compiler for Javascript minification because it's more powerful, YUICompressor has some issues minifiying certain Javascript, and YUICompressor is no longer being maintained wheras Google Closure Compiler is.