Enum ModuleLoader.ResolutionMode
- java.lang.Object
-
- java.lang.Enum<ModuleLoader.ResolutionMode>
-
- com.google.javascript.jscomp.deps.ModuleLoader.ResolutionMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ModuleLoader.ResolutionMode>
- Enclosing class:
- ModuleLoader
public static enum ModuleLoader.ResolutionMode extends java.lang.Enum<ModuleLoader.ResolutionMode>
Standard path base resolution algorithms that are accepted as a command line flag.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BROWSER
Mimics the behavior of MS Edge.BROWSER_WITH_TRANSFORMED_PREFIXES
A limited superset of BROWSER that transforms some path prefixes.NODE
Uses the node module resolution algorithm.WEBPACK
Uses a lookup map provided by webpack to locate modules from a numeric id used during import
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ModuleLoader.ResolutionMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ModuleLoader.ResolutionMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BROWSER
public static final ModuleLoader.ResolutionMode BROWSER
Mimics the behavior of MS Edge. Modules must begin with a "." or "/" character. Modules must include the file extension MS Edge was the only browser to define a module resolution behavior at the time of this writing.
-
BROWSER_WITH_TRANSFORMED_PREFIXES
public static final ModuleLoader.ResolutionMode BROWSER_WITH_TRANSFORMED_PREFIXES
A limited superset of BROWSER that transforms some path prefixes.For example one could configure this so that "@root/" is replaced with "/my/path/to/project/" within import paths.
-
NODE
public static final ModuleLoader.ResolutionMode NODE
Uses the node module resolution algorithm.Modules which do not begin with a "." or "/" character are looked up from the appropriate node_modules folder. Includes the ability to require directories and JSON files. Exact match, then ".js", then ".json" file extensions are searched.
-
WEBPACK
public static final ModuleLoader.ResolutionMode WEBPACK
Uses a lookup map provided by webpack to locate modules from a numeric id used during import
-
-
Method Detail
-
values
public static ModuleLoader.ResolutionMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ModuleLoader.ResolutionMode c : ModuleLoader.ResolutionMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModuleLoader.ResolutionMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-