Global

Type Definitions

givenDependency

A number of functions accept a dependency as an argument.

If the dependency is an object, at least one of the properties must be given.

If the dependency is a string, it is converted to an object with the location property set to the value of the string.

Type:
  • Object | string
Properties:
Name Type Argument Description
name string <optional>

The name of the dependency.

If only the name is given then the location is resolved relative to the packagesDirectory of the package config (generally "node_modules").

location string <optional>

The location of the dependency.

If the location is relative it is resolved relative to the location of the package config.

Source:
  • require.js, line 625