Introduce feature flag component
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>pull/10616/head
parent
6995bdfbca
commit
bfbfcc04bd
|
@ -0,0 +1,15 @@
|
|||
import {SFC} from 'react'
|
||||
|
||||
interface Props {
|
||||
children?: any
|
||||
}
|
||||
|
||||
const FeatureFlag: SFC<Props> = props => {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
return props.children
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export default FeatureFlag
|
|
@ -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'),
|
||||
|
|
Loading…
Reference in New Issue