public class ModuleLoader.ModulePath extends Object
Modifier and Type | Method and Description |
---|---|
ModuleLoader.ModulePath |
resolveJsModule(String moduleAddress)
Find a JS module
requireName . |
ModuleLoader.ModulePath |
resolveJsModule(String moduleAddress,
String sourcename,
int lineno,
int colno)
Find a JS module
requireName . |
ModuleLoader.ModulePath |
resolveModuleAsPath(String moduleAddress)
Treats the module address as a path and returns the name of that module.
|
String |
toJSIdentifier()
Turns a filename into a JS identifier that can be used in rewritten code.
|
String |
toModuleName()
Turns a filename into a JS identifier that is used for moduleNames in
rewritten code.
|
String |
toString() |
public String toJSIdentifier()
public String toModuleName()
@Nullable public ModuleLoader.ModulePath resolveJsModule(String moduleAddress)
requireName
. See
https://nodejs.org/api/modules.html#modules_all_togethernull
if not found.@Nullable public ModuleLoader.ModulePath resolveJsModule(String moduleAddress, String sourcename, int lineno, int colno)
requireName
. See
https://nodejs.org/api/modules.html#modules_all_togethernull
if not found.public ModuleLoader.ModulePath resolveModuleAsPath(String moduleAddress)
Primarily used for per-file ES6 module transpilation
Copyright © 2009-2017 Google. All Rights Reserved.