abbasfreestyle/react-native-af-video-player

Uglify-JS removes fn-names

Opened this issue · 1 comments

When compiling the player using react-native and minify enabled the minifier removes (default option) all function names. This leads to an issue using the fullscreen scrolling view:

  1. Compile without (!) --minify

  2. Start fullscreen within provided scrollview => Working

  3. Compile with --minify

  4. Start fullscren within provided scrollview => NOT working

Quickfix: Disable function name mangling inside the minifier node module:

In node_modules/uglifyjs-webpack-plugin/dist/uglify/minify.js

...
function minify(inputCode, inputMap) {
  const result = uglify.minify(inputCode, {
  keep_fnames: false
...

Hi @christian667,

I haven't tested this with uglify. Did you have any luck finding a similar issue raised with uglify + react native?