Merge remote-tracking branch 'origin/master' into afc-metrics-spike

This commit is contained in:
Alberto Fernández Capel
2018-05-23 09:38:22 +01:00
49 changed files with 1737 additions and 681 deletions
+13 -2
View File
@@ -1,7 +1,9 @@
const fs = require('fs')
const path = require('path')
const webpack = require('webpack')
const MODULES_PATH = path.join(__dirname, '/modules')
const webpackENV = process.env.WEBPACK_ENV || 'development'
// Generate a hash of entry points, including modules
const entryPoints = {}
@@ -80,6 +82,15 @@ module.exports = {
jquery: path.join(__dirname, 'node_modules/jquery/dist/jquery'),
}
},
// TODO
// plugins: {}
plugins: [
new webpack.DefinePlugin({
// Swaps out checks for NODE_ENV with the env. This is used by various
// libs to enable dev-only features. These checks then become something
// like `if ('production' == 'production')`. Minification will then strip
// the dev-only code from the bundle
'process.env': {
NODE_ENV: JSON.stringify(webpackENV)
},
})
]
}