js-badge Created with Sketch.
my-component.js (0.8kb)
js-badge Created with Sketch.
my-component.js (1.2kb)

Compony will minify the JavaScript you write in components by uglifying the JavaScript inside the dist folder. This lowers the filesize of your loaded in JavaScript considerably.

Compony won't aggregate JavaScript, as that is already taken care off by Drupal. Make sure that you have CSS and JS aggregation enabled in production!

Trick: If something is throwing an error in your local development and the error is coming from an uglified file, you can more easily debug by linking to the original .js file (the one not in the dist folder) from your libraries.yml file.