F
find
Finds a module matching a filter. Lazy unless { lazy: false } is passed, or all is set: the search runs on first access.
function find(filter: MetroFilter, options?: MetroSearchOptions): anyParameters
| Name | Type | Description |
|---|---|---|
| filter | MetroFilter | The filter to match modules against: a built-in, a combination, or a predicate you write, which the build keys for the cache. |
| options? | MetroSearchOptions | Search options controlling interop, caching, esModule unwrapping, and |
Returns
anyThe matched module, an array of matches when all is set, undefined when the cache knows it is missing, or null.