0

When i built Ext JSapp using Sencha CMD command: sencha app build, though the files are minified, extra spaces removed etc BUT the console.log statements still persist and gets executed which is unwanted in PROD ENV!. Any configurations needed while build, so that console log statment(console.log, info, warn etc) can be wiped/removed in Prod Built code output?

Thanks !

DevPro
  • 21
  • 3

1 Answers1

2

You should use Ext.log instead of console.log. Then the statements should not be included in the production build.

You can see in the source file, it uses debug directives like this:

log:
    //<debug>
        (function () {
...

You can read more about debug directives here.

Alohci
  • 78,296
  • 16
  • 112
  • 156
Dave L.
  • 9,595
  • 7
  • 43
  • 69