- Webpack: see definePlugin - the plugin does a direct text replacement. If you perform logging in your development build but not in the production build you might use a global constant to determine whether logging takes place.
- The value given to it must include actual quotes inside of the string itself. Typically, this is done either with alternate quotes, such as:
- or by using JSON.stringify('production')