zalmoxisus / crossbuilder

Building web, Electron, Cordova and Chrome apps, and cross-browser extensions with React, Redux and Webpack. "Write once, deploy everywhere" concept in practice.
MIT License
484 stars 50 forks source link

changed uglify options #47

Closed brandonmp closed 8 years ago

brandonmp commented 8 years ago

2 changes here:

  1. i think compressor should be compress. i'm not sure if both work or not, but the (webpack docs)[http://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin] say compress

  2. UglifyJS unescapes \u0000 and other unicode char code strings and converts them . this results in some libraries (eg,js-base64,firebase) getting screwed up, and Chrome refusing to load the extension b/c theinjectionisn'tutf-8`.

i hit that problem today and have been researching it. i could be wrong, but wanted to put in a PR to see what you thought

there's a couchDB bug that briefly explains it here

the post that discusses the solution is on the uglify repo here

zalmoxisus commented 8 years ago

Thanks a lot for the fixes!