When Using Closure-Library
"Includes" are handled via goog.require calls. See https://developers.google.com/closure/library/docs/tutorial#zippy
In un-compiled code, the included scripts are dynamically inserted. During compilation, the compiler will include all the necessary scripts and dead-code elimination will remove the unused methods and symbols.
Other Options
The most popular option for handling JavaScript includes/dependencies is RequireJS. RequireJS does dynamic script insertion. Closure-compiler has a Common JS pass which translates RequireJS require
calls to goog.require
calls so that the compiler can then include them directly during compilation.