Skip to content

Enhanced support for tsconfig customConditions #1341

Description

@uhyo

Hi, thank you for developing the oxc family. I'm using them to implement my own linter tool.

Problem

Oxc-resolver does not automatically apply the customConditions option from the tsconfig, unlike how it does for paths etc.

Users must resolve customConditions manually on their own and pass them to the resolver's customConditions option if they need to replicate TypeScript's resolution results in a customConditions-aware way.

What's worse, while oxc-resolver exposes tsconfig resolution results, customConditions isn't available through the CompilerOptions struct.

This forces us to manually resolve and parse tsconfig.json (including extends handling) to have customConditions supported properly.

Proposed Solution

If possible, it'd be the best if oxc-resolver could apply customConditions from tsconfig automatically.

If not, it'd be nice if the CompilerOptions struct included a custom_conditions field so users can pass them to the resolver.

Thank you 💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions