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 !

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.