 DEVMODE       = not PRODMODE
 MINIFY        = !! process.env.WP_MINIFY
 DEBUG         = '--debug' in process.argv
+MEASURE       = process.env.MEASURE
 SOURCE_MAP    = !! process.env.SOURCE_MAP
 STATICPAGES   = !! process.env.CC_STATICPAGES  # special mode where just the landing page is built
 date          = new Date()

else
    plugins = plugins.concat(staticPages)

BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
bundleAnalyzerPlugin = new BundleAnalyzerPlugin({analyzerMode: 'static'})

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

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

    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
