DEV Community

Discussion on: Implementing feature toggles for a React App using Webpack

Collapse
 
sarokrishnan profile image
Saro • Edited

Using DefinePlugin for my feature flag or toggle. here is the code reference.

new webpack.DefinePlugin({
'NICE_FEATURE': JSON.stringify(false),
})
It compiles and app can refer the value correctly. If I update the value to true and after I run npm i and then I still see the old value. Can you please help here.