diff --git a/source/containers/Layout.js b/source/containers/Layout.js index 3f5ac6953..0557ceb3e 100644 --- a/source/containers/Layout.js +++ b/source/containers/Layout.js @@ -13,7 +13,6 @@ import R from 'ramda' export default class Layout extends Component { render() { - console.log('window.location.href.toString()', window.location.href.toString()) let displayWarning = ['/simu/', '/regle/'].find(t => window.location.href.toString().indexOf(t) > -1) return ( diff --git a/source/webpack.config.js b/source/webpack.config.js index 0fffe49e4..d2a5f5ac7 100644 --- a/source/webpack.config.js +++ b/source/webpack.config.js @@ -61,19 +61,13 @@ module.exports = { loader: 'babel-loader!nearley-loader' }] }, - plugins: prodEnv ? [ + plugins: [ + new webpack.EnvironmentPlugin(['NODE_ENV']), new webpack.NoEmitOnErrorsPlugin(), - // in order to use the fetch polyfill: new webpack.ProvidePlugin({ - 'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch' + 'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch', }), - new webpack.optimize.UglifyJsPlugin() - ] : [ - new webpack.HotModuleReplacementPlugin(), - new webpack.NoEmitOnErrorsPlugin(), - // in order to use the fetch polyfill: - new webpack.ProvidePlugin({ - 'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch' - }) ] + .concat(!prodEnv ? [new webpack.HotModuleReplacementPlugin()] : []) + .concat(prodEnv ? [new webpack.optimize.UglifyJsPlugin()] : []), }