diff --git a/ui/src/shared/components/FeatureFlag.tsx b/ui/src/shared/components/FeatureFlag.tsx new file mode 100644 index 0000000000..ac63488a59 --- /dev/null +++ b/ui/src/shared/components/FeatureFlag.tsx @@ -0,0 +1,15 @@ +import {SFC} from 'react' + +interface Props { + children?: any +} + +const FeatureFlag: SFC = props => { + if (process.env.NODE_ENV === 'development') { + return props.children + } + + return null +} + +export default FeatureFlag diff --git a/ui/webpack/dev.config.js b/ui/webpack/dev.config.js index b4c57df65c..7fc3b64650 100644 --- a/ui/webpack/dev.config.js +++ b/ui/webpack/dev.config.js @@ -145,6 +145,9 @@ module.exports = { ], }, plugins: [ + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': JSON.stringify('development'), + }), new webpack.DllReferencePlugin({ context: process.cwd(), manifest: require('../build/vendor.dll.json'),