mozilla / tofino

Project Tofino is a browser interaction experiment.
https://mozilla.github.io/tofino
Apache License 2.0
647 stars 68 forks source link

Add test making sure we're not checking NODE_ENV for anything other than making sure we're running tests #1370

Closed victorporof closed 7 years ago

victorporof commented 7 years ago

Everything that is necessary should be in the build config. The necessity of having build config properties to determine whether or not we're running in production or development have been discussed before and can be reiterated if needed.

The NODE_ENV.TEST flag is different because testing can happen for both production and development builds, and we don't want to perform rebuilds just because we're running tests (so this shouldn't live in the build config).

victorporof commented 7 years ago

As discussed, there's only 3 places we're checking for NODE_ENV at the moment in webpacked code (command-line.js, configure-store.js and btn.jsx), and all are correct except for the one mentioned in https://github.com/mozilla/tofino/issues/1369. Upon further consideration, no real reason to keep this open, better documentation will help.