As the title states, the js code obfuscated by uglify cannot be executed in the webview of ios.
Due to the need for encryption and obfuscation before the company's products were launched, I used webpack -p to compress a piece of very simple js and threw it to the ios engineer, and then I was told that all the js was invalid.
Webview needs to be configured separately? Or does it not support uglify and future codes at all? consult
Sorry, I found the problem. Before webpack -p, I wrote var $=require('jquery.min.js'); in main.js. This way of writing
may be because .min.js has been uglified. As a result, the webview cannot be used after being confused again..
Just remove this dependency
There shouldn’t be such a problem. At that time, I made the webview version of the app with iOS and Android. At that time, the js was compressed by r.js. It can be used on all three platforms