Class ProjectExport

Project entry corresponding to package entry point.

Hierarchy (view full)

Constructors

Accessors

  • get sourceFile(): Promise<null | string>
  • Path to source file to transpile during the build relative to sources directory, or null if this entry is not transpiled.

    By default, searches for main.(m|c)?ts, mod.(m|c)?ts, or index.(m|c)?ts file in sources sub-directory corresponding to export path of the entry.

    For example:

    • . converted to ./src/mod.ts,
    • ./util converted to ./src/util/mod.ts.

    Returns Promise<null | string>

Methods

  • Searches for path or pattern matching all provided conditions.

    Tries to find an entry point without default and import conditions if not found.

    Parameters

    • Rest...conditions: string[]

      Required export conditions. When missing, searches for default one.

    Returns undefined | `./${string}`

    Matching path or pattern, or undefined when not found.