Class ModuleMetadataMap


  • public final class ModuleMetadataMap
    extends java.lang.Object
    Contains metadata around modules (or scripts) that is useful for checking imports / requires.

    TODO(johnplaisted): There's an opportunity for reuse here in ClosureRewriteModules, which would involve putting this in some common location. Currently this is only used as a helper class for Es6RewriteModules. CompilerInput already has some (not all) of this information but it is not always populated. It may also be ideal to include CommonJS here too as ES6 modules can import them. That would allow decoupling of how these modules are written; right now Es6RewriteModule only checks this for goog.requires and goog: imports, not for ES6 path imports.