[v4] Uglify is not executed (Dropping console)


I want to get rid of console logs in production. Therefore, I’ve added the following line to package.json

"config": {
    "ionic_uglifyjs": "./config/uglifyjs.config.js"

The content of the file is the following

module.exports = {
    compress: { drop_console: true }

when running

ionic cordova prepare ios --prod --release --verbose

there is no output related to uglifyjs and the console.logs are still there.

Does anyone know whats wrong?


I’ve read that app-scripts are dropped in Ionic 4. Is this the issue?

How can I use and configure uglify in Ionic 4 to drop the console?