From your command prompt/terminal go to your app's root folder and execute:
cordova plugin add cordova-plugin-minify
The plugin will now automatically minify --release builds.
The plugin root folder contains a minifyconfig.json file containing the default configuration which can be altered after placing it in the root of your cordova project.
minifyEnabled: One of the options "Always", "Release" or "Never", default "Release".
<script src="..."></script>tags in html by minified file specified by
files.pathsto manipulate the order html files are scanned.
paths: The paths (and order) of files and folders that are scanned (html) or minified (js/css). Paths are relative to www path in cordova project directory.
recursive: if true, scans the paths recursively including files in all subfolders.
<script src="..."></script>tags in file system), default "scanDirectory".
cleanCSSOptions: The options to pass to the cleanCSS minifier (See https://github.com/jakubpawlowicz/clean-css)
The configuration above runs for both debug and release builds. The plugin scans all html files for