Class Es6RelativizeImportPaths

  • All Implemented Interfaces:
    CompilerPass

    @GwtIncompatible("java.net.URI")
    public class Es6RelativizeImportPaths
    extends java.lang.Object
    implements CompilerPass
    Rewrites ES6 import paths to be relative after resolving according to the compiler's module resolver.

    Useful for servers that wish to preserve ES6 modules, meaning their paths need to be valid in the browser.

    • Constructor Detail

      • Es6RelativizeImportPaths

        public Es6RelativizeImportPaths​(AbstractCompiler compiler)
    • Method Detail

      • process

        public void process​(Node externs,
                            Node root)
        Description copied from interface: CompilerPass
        Process the JS with root node root. Can modify the contents of each Node tree
        Specified by:
        process in interface CompilerPass
        Parameters:
        externs - Top of external JS tree
        root - Top of JS tree