Class Es6RelativizeImportPaths

java.lang.Object
com.google.javascript.jscomp.Es6RelativizeImportPaths
All Implemented Interfaces:
CompilerPass

public class Es6RelativizeImportPaths extends 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 Details

    • Es6RelativizeImportPaths

      public Es6RelativizeImportPaths(AbstractCompiler compiler)
  • Method Details

    • 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