fix(client): Make devtools optional/disable

You must enable debug to enable devtools
This commit is contained in:
Berkeley Martinez
2018-01-17 10:43:41 -08:00
parent e5ea612f40
commit 9c155c73ed

View File

@ -22,7 +22,7 @@ const isDev = Rx.config.longStackSupport = debug.enabled('fcc:*');
const log = debug('fcc:client'); const log = debug('fcc:client');
const hotReloadTimeout = 2000; const hotReloadTimeout = 2000;
const { const {
devToolsExtension = _.noop, devToolsExtension,
location, location,
history: _history, history: _history,
document, document,
@ -61,7 +61,7 @@ createApp({
defaultState, defaultState,
epics, epics,
epicOptions, epicOptions,
enhancers: [ devToolsExtension() ] enhancers: isDev && devToolsExtension && [ devToolsExtension() ]
}) })
.doOnNext(({ store }) => { .doOnNext(({ store }) => {
if (module.hot && typeof module.hot.accept === 'function') { if (module.hot && typeof module.hot.accept === 'function') {