Redux tracing env variable
parent
6b2799c9e7
commit
a59cf9e708
|
@ -45,6 +45,13 @@ yarn start
|
|||
|
||||
L'application est exécuté sur https://localhost:8080/mon-entreprise pour la version française et http://localhost:8080/infrance pour la version anglaise.
|
||||
|
||||
Pour activer le tracing Redux:
|
||||
|
||||
```
|
||||
REDUX_TRACE=true yarn start
|
||||
```
|
||||
|
||||
|
||||
### Messages de commit
|
||||
|
||||
A mettre sans retenue dans les messages de commit :
|
||||
|
|
|
@ -18,8 +18,17 @@ declare global {
|
|||
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: any
|
||||
}
|
||||
}
|
||||
|
||||
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
|
||||
if (process.env.REDUX_TRACE) {
|
||||
console.log('going to trace')
|
||||
}
|
||||
const composeEnhancers =
|
||||
(process.env.REDUX_TRACE
|
||||
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ &&
|
||||
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
|
||||
trace: true,
|
||||
traceLimit: 25,
|
||||
})
|
||||
: window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose
|
||||
|
||||
if (
|
||||
process.env.NODE_ENV === 'production' &&
|
||||
|
|
|
@ -19,7 +19,10 @@ module.exports = {
|
|||
plugins: [
|
||||
...common.plugins,
|
||||
...HTMLPlugins(),
|
||||
new webpack.EnvironmentPlugin({ NODE_ENV: 'development' }),
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'development',
|
||||
REDUX_TRACE: false,
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
],
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue