locate

  • function
steal.hooks.locate  

A loader hook that is used to identify the location (such as the URL) where a module can be fetched.

locate(load)

Parameters

  1. load {load}

    The load object associated with this module.

Returns

{Promise | String}

the result

The locate hook is the second hook in the module loading lifecycle. It is used to determine from where a module can be fetched.

loader.locate({
  name: "foo"
}).then(function(address){
  address === "http://example.com/foo.js"
});
Help us improve StealJS by taking our community survey