Problem: It looks like you're using a minified copy of the development build of React.
So you may have found this message in your console log like I did. There is a link to the react downloads explaining that you need to set
production so you get the production version of React. This doesn't have some of the code that is useful for debugging in the development version.
You may also be surprised by this as you have tried to set
production and it is not working.
eg: I had this in my
A console log also showed it was being set correctly to
After some searching I found this webpack issue that seemed to suggest something funky was going on. It looks like I need to use webpacks's
DefinePlugin. I was already using the
UglifyJSPlugin, but perhaps you will need that too.
You may be able to get away with:
but I use webpack-config, so in my
webpack.base.config.js I have:
This allows me to use the
NODE_ENV passed in from
A quick hack to get webpack using the production version of React and it seems to be working for now.