fynjs API
    Preparing search index...

    Function tryResolve

    • try to resolve an optional module, with optional handling in case it's not found

      Parameters

      • meta: ImportMetaLike

        import.meta from the caller's context

      • specifier: string

        the module specifier to resolve

      • OptionaloptsOrMsg: OptsOrMessage

        options, or message to log when the module is not found

      • log: LogFunction = defaultLog

      Returns any

      the resolved URL, or the default / notFound result when not found

      This is synchronous. Resolving does not evaluate the module, so it can answer "is this dependency available?" without await, which is often the whole question.