diff --git a/src/pages/root/RootPage.jsx b/src/pages/root/RootPage.jsx index ffe90d0..164f30d 100644 --- a/src/pages/root/RootPage.jsx +++ b/src/pages/root/RootPage.jsx @@ -6,16 +6,22 @@ import classNames from 'classnames'; import Userbar from 'components/userbar/Userbar'; import PopupStack from 'components/ui/popup/PopupStack'; -import DevTools from 'containers/DevTools'; import styles from './root.scss'; import messages from './RootPage.intl.json'; +/* global process: false */ +let DevTools; +if (process.env.NODE_ENV === 'production') { + DevTools = () => null; +} else { + DevTools = require('containers/DevTools').default; +} + function RootPage(props) { const isRegisterPage = props.location.pathname === '/register'; - /* global process: false */ return (
- {process.env.NODE_ENV === 'production' ? null : } +
); } diff --git a/src/storeFactory.js b/src/storeFactory.js index 3008f71..0febcd6 100644 --- a/src/storeFactory.js +++ b/src/storeFactory.js @@ -8,7 +8,6 @@ import { syncHistory } from 'react-router-redux'; import { browserHistory } from 'react-router'; import reducers from 'reducers'; -import DevTools from 'containers/DevTools'; export default function storeFactory() { const reduxRouterMiddleware = syncHistory(browserHistory); @@ -22,6 +21,7 @@ export default function storeFactory() { if (process.env.NODE_ENV === 'production') { enhancer = compose(middlewares); } else { + const DevTools = require('containers/DevTools').default; enhancer = compose(middlewares, DevTools.instrument()); }