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
不好意思,找到问题了,webpack -p之前在main.js里写了var $=require('jquery.min.js');这样的写法
可能由于.min.js已经是uglify过的了,导致再次混淆后webview里无法使用..
去掉这句依赖就可以了
应该不会有这种问题的,当时我和ios还有安卓一起弄的webview版的app,当时js用的是r.js这个压缩的,三种平台下都可以的