Ƭ ScriptLocatorResolver: (scriptId
: string
, caller?
: string
) => Promise
<ScriptLocator
| undefined
>
▸ (scriptId
, caller?
): Promise
<ScriptLocator
| undefined
>
Defines a function to resolve a script locator used in {@link ScriptManagerConfig}. It's an async function which should return an object with data on how ScriptManager should fetch the script. All fields describing the script locator data are listed in ScriptLocator.
Return undefined
if the script should be resolved by other resolvers instead.
Name | Type | Description |
---|---|---|
scriptId |
string |
Id of the script to resolve. |
caller? |
string |
Name of the calling script - it can be for example: name of the bundle, chunk or container. |
Promise
<ScriptLocator
| undefined
>