resolve-import
    Preparing search index...

    Function resolveImport

    • Resolve an import URL or string as if it were coming from the module at parentURL.

      Returns a string for node builtin modules, and a file:// URL object for anything resolved on disk.

      If the resolution is impossible, then an error will be raised, which closely matches the errors raised by Node when failing for the same reason.

      Parameters

      • url: string | URL

        the thing being imported

      • parentURL: string | URL | undefined = undefined

        the place the import() would be coming from. Required for relative imports.

      • options: ResolveImportOpts = {}

      Returns Promise<string | URL>