@oazmi/esbuild-plugin-deno - v0.4.0
    Preparing search index...

    Function nodeModulesResolverFactory

    • this factory function creates a path-resolver function that mimics esbuild's native-resolver's behavior.

      the slyish way how it works is that we create a new build process to query esbuild what it would hypothetically do if so and so input arguments were given, then through a custom inner plugin, we capture esbuild's response (the resolved path), and return it back to the user.

      Note

      the internal resolver function accepts "file://" uris for the following list of OnResolveArgs fields, and converts them to local paths for esbuild to understand:

      • path
      • resolveDir
      • importer

      with this feature, you won't have to worry about file-uris at all.

      Parameters

      Returns (
          args: Pick<OnResolveArgs, "path" | "resolveDir" | "importer">,
      ) => Promise<OnResolveResult>