diff --git a/lib/DevTools.js b/lib/DevTools.js index 2282c4aa..93eecd55 100644 --- a/lib/DevTools.js +++ b/lib/DevTools.js @@ -1,6 +1,12 @@ -import {connectViaExtension} from 'remotedev'; import _ from 'underscore'; +const {connectViaExtension} = process.env.NODE_ENV === 'production' ? require('remotedev') : { + connectViaExtension: () => ({ + init: () => {}, + send: () => {}, + }), +}; + class DevTools { /** * @callback onStateChange @@ -42,7 +48,7 @@ class DevTools { */ clearState(keysToBeRemoved = []) { const pairs = _.map(keysToBeRemoved, key => [key, undefined]); - this.registerAction('CLEAR', undefined, _.object((pairs))); + this.registerAction('CLEAR', undefined, _.object(pairs)); } }