mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Properly remove DevTools from production build
This commit is contained in:
@@ -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 (
|
||||
<div className={styles.root}>
|
||||
<div id="view-port" className={classNames(styles.viewPort, {
|
||||
@@ -39,7 +45,7 @@ function RootPage(props) {
|
||||
</div>
|
||||
</div>
|
||||
<PopupStack />
|
||||
{process.env.NODE_ENV === 'production' ? null : <DevTools /> }
|
||||
<DevTools />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user