I am about to ship an ionic 3 app and i am running in the process of obfuscating and uglifying the code.
For uglification, we are using the builtin uglifyer which gets executed when building with --prod.
For obfuscation we are running WEBPACK-OBFUSCATOR (Javascript-obfuscator) https://github.com/javascript-obfuscator/javascript-obfuscator
The below order is executed when building: 1- the webpack configuration runs --> which leads to obfuscating the code. and 2- the uglification performed by default by ionic3
Questions: Is this the correct order? should we obfuscate and then uglify or should we uglify and then obfuscate. I am running into this since we tried to set obfuscation with "selfDefend" enabled, which basically does not allow any change on the code after obfuscation: so after uglification we code failed.
So we are left with 2 options:
1- Change the order: does not seem possible in Ionic . (please confirm) .
2- Disable the self defense option.
Thank you in advance.