Javascript - Logger / Logging (Tracing)


logging in Javascript


  • 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:
      • '“production”',
      • or by using JSON.stringify('production')


Share this page:
Follow us:
Task Runner