title: How to do constant values minification in javascript?
body: <p>I have a requirement to minify the constant values in the javascript project I am working on. </p>
  
  <p>Currently I define the constants as something like this:</p>
  
  <pre><code>export const Constants = {
      I_AM_CONSTANT: 'hello',
      ANOTHER_CONSTANTS: 10,
      YET_ANOTHER_CONSTANTS: false,
      NO_MORE_CONSTANT: 'end'
  };
  </code></pre>
  
  <p>and I put this object into a separate file.</p>
  
  <p>Then I use UglifyPlugin of WebPack to minify the codes.</p>
  
  <p>But what I get is something like </p>
  
  <pre><code>e.Constants = {
      I_AM_CONSTANT: 'hello',
      ANOTHER_CONSTANTS: 10,
      YET_ANOTHER_CONSTANTS: false,
      NO_MORE_CONSTANT: 'end'
  };
  </code></pre>
  
  <p>It's like no minification effect at all. Can anyone tell me what is the correct way to do the minifications for these constants? How can I change my code? I also would like to know some best practice of writing constant values in javascript if possible.</p>