title: Remove some code lines in production distribution files?
body: <p>I'm using <code>Babel</code> and <code>Webpack</code> to generate <code>ES5</code> code from <code>ES6</code>. There are some validations that is used to reduce the mistakes i do while coding.</p>
  
  <pre><code>class Logger {
      /**
       * @param {LogModel} info
       *  {LogTypes} type
       *  {String} message
       *  {Date} date
       */
      static log(info) {
          if(info instanceof LogModel)
              throw new Error("not a instance of LogModel");
  
          notify(info);
      }
  }
  </code></pre>
  
  <p>In <code>log</code> function, I validate whether the argument is a instance of <code>LogModel</code> class. This is just to prevent mistakes. I don't want that if condition to be in the production because too many if condition going to slow the application. Is it possible to generate development release with validations and production release without those validations with <code>Babel</code> and <code>Webpack</code>?</p>