Tag: uglifyjs

  • How To Use UglifyJS Conditional Compilation With reduce_vars

    UglifyJS supports conditional compilation using the “–define” argument. Even though this option is good enough, it “looks” messy. The command prompt argument becomes too long and making an addition to the constant feels dreaded. Here is a quick way to use separate js file to define all your constants and use it in subsequent files.…


  • Randomize Variable Names Each Time UglifyJS Runs

    Why Randomize Variable Names? If you are using UglifyJS to uglify your JavaScript code, you are using it only to serve a single purpose – to make it hard for anyone to peek into your code. But if you have minor changes to the code, variable names still come out pretty much same. So it…