🐛 Utiliser la version de prod de React

Devrait accélérer l'UI :)
pull/6/head
mama 2017-05-05 19:55:29 +02:00
parent e8abb42f5b
commit c9b09398eb
2 changed files with 5 additions and 12 deletions

View File

@ -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 (

View File

@ -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()] : []),
}