Enum Class ModuleLoader.ResolutionMode
java.lang.Object
java.lang.Enum<ModuleLoader.ResolutionMode>
com.google.javascript.jscomp.deps.ModuleLoader.ResolutionMode
- All Implemented Interfaces:
Serializable
,Comparable<ModuleLoader.ResolutionMode>
,Constable
- Enclosing class:
ModuleLoader
Standard path base resolution algorithms that are accepted as a command line flag.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMimics the behavior of MS Edge.A limited superset of BROWSER that transforms some path prefixes.Uses the node module resolution algorithm.Uses a lookup map provided by webpack to locate modules from a numeric id used during import -
Method Summary
Modifier and TypeMethodDescriptionstatic ModuleLoader.ResolutionMode
Returns the enum constant of this class with the specified name.static ModuleLoader.ResolutionMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
Uses a lookup map provided by webpack to locate modules from a numeric id used during import
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-