     publicPath = CDN_BASE_URL
 else
     publicPath = path.join(BASE_URL, misc_node.OUTPUT_DIR) + '/'
+
+if MEASURE
+    BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
+    bundleAnalyzerPlugin = new BundleAnalyzerPlugin({analyzerMode: 'static'})
+    plugins = plugins.concat([bundleAnalyzerPlugin])
 
 module.exports =
     cache: true

console.log "CDN_BASE_URL     = #{CDN_BASE_URL}"
console.log "DEBUG            = #{DEBUG}"
console.log "MINIFY           = #{MINIFY}"
console.log "INPUT            = #{INPUT}"
console.log "OUTPUT           = #{OUTPUT}"
console.log "GOOGLE_ANALYTICS = #{GOOGLE_ANALYTICS}"

else
    plugins = plugins.concat(staticPages)

if PRODMODE
    # configuration for the number of chunks and their minimum size
    plugins.push new webpack.optimize.LimitChunkCountPlugin(maxChunks: 5)

plugins = plugins.concat([assetsPlugin, statsWriterPlugin])

UglifyJsPlugin = require('uglifyjs-webpack-plugin')
minimizer = new UglifyJsPlugin
