javascript - The js code obfuscated by uglify cannot be executed in the webview of ios
世界只因有你
世界只因有你 2017-07-05 11:04:12
0
2
959

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

世界只因有你
世界只因有你

reply all(2)
大家讲道理

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template