Add UglifyJS in Asset Upload

Hey Twitch Developer Community,

It would be great if i could define somehow in the extension development process, that certain files can be processed with a minifier and compressor (uglify).

I imagine it somehow like this:

  1. I define my js-files that need to uglify
  2. i zip my extension and upload it to dev.twitch.tv
  3. in the upload process, the files that need to be uglyfied will be minified & compressed.
  4. the files are uploaded to the twitch cdn.

You could somehow define a twitch-manifest.json in the root directory where you define the files for the uglify process.

Advantage: Twitch has human-readable files for the review process and the cdn only delivers the minified & compressed assets. In addition, this process saves extreme loading times. The source code becomes up to 75 percent smaller.

With UglifyJS:

     /js/vendor.js     406 kB
/js/live-config.js     227 kB
     /js/config.js     227 kB
      /js/panel.js     233 kB

Without UglifyJS:

     /js/vendor.js    1.55 MB
/js/live-config.js     433 kB
     /js/config.js     432 kB
      /js/panel.js     440 kB

Libs: https://www.npmjs.com/package/uglify-js

Greetings,
GhostZero // René