If the point is to perform dead code elimination, why would you declare it as an extern? It seems reasonable to me to just treat it as another of your javascript files to be included in the compilation run.
tldr: The reason people pull it as an extern is because it does not work with advanced optimisations.