2

I have a 'modular' backend where two different services/repos are serving up client side js to the same client. I need the JS from both sources to be minified and work together as one is dependent on the other. They are currently minified independently so the js breaks. edit: To clarify the minification is aggressive and is minifying all names.

joemillervi
  • 1,009
  • 1
  • 8
  • 18

1 Answers1

3

Compile them together. You can use the code splitting flags to direct distinct inputs into unique output files. You will get maximum renaming with this method.

If you absolutely cannot compile them at the same time, you'll have to eliminate most of the benefits of ADVANCED mode and create externs and exports so that the scripts can coordinate. In this way they are both external to each other.

Community
  • 1
  • 1
Chad Killingsworth
  • 14,360
  • 2
  • 34
  • 57
  • This is the conclusion I came to. Examples listed down the page here: https://developers.google.com/closure/compiler/docs/api-tutorial3 – joemillervi Oct 26 '16 at 21:05