Aggregating JavaScript generates errors and breaks JS functionality
This issue is usually -- but not always -- because someone has written Javascript without adding semicolons in the appropriate places. JS is valid without them but only when there is also a line-end at that point. Many JS preprocessors remove line breaks, so making the JS invalid.

This can be resolved by examining the JS source for missing semicolons and adding them; a good JS IDE will be able to guide you as to where.

Another issue that sometimes occurs is when the JS code has not been properly context-wrapped. Drupal standard practice is to include a function() { js(); code(); here(); } (); wrapper around code blocks because that limits the scope of names to that block; without it, the scope could be global and thus can be interfered with by other blocks of code.

The Drupal solution, which also solves another problem, is to use the "Drupal.behaviours". construct. Check the Drupal JS files for that string for examples.