Javascript - Logger / Logging

> (World Wide) Web - (W3|WWW) > Javascript (Js|ECMAScript)

Table of Contents

1 - About

logging in Javascript

2 - List

  • 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')
Advertising