JSRequireTarget enum
An enumeration of possible targets in which to include the require.
Constructors
- JSRequireTarget()
-
const
Values
- all → const JSRequireTarget
-
The require is available for all targets that any other JSRequire uses.
This target is always loaded for the CLI, and if jsModuleMainLibrary is set it's always for the
"default"
conditional export in package.json. - cli → const JSRequireTarget
-
The require is available for all command-line executables, but not for the the standalone library.
- node → const JSRequireTarget
-
The require is available only when loaded by Node.js.
This corresponds to the
"node"
conditional export in package.json. Note that all Node requires are also available for CLI targets. - browser → const JSRequireTarget
-
The require is available only when loaded in a browser.
This corresponds to the
"browser"
conditional export in package.json. - defaultTarget → const JSRequireTarget
-
The require is available when loaded by the default target.
This corresponds to the
"default"
conditional export in package.json. These requires will be used by any platform for which no other requires are specified. For example, Node.js will use these requires if and only if there are no requires explicitly specified for node.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
JSRequireTarget> - A constant List of the values in this enum, in order of their declaration.