Skip to content

getOptions function doesn't account for extends in tsconfig.json #99

Description

@markacola

The getOptions function that uses joycon to load the tsconfig.json doesn't account for extends within the retrieved tsconfig.json file.
This can result in the jsxFactory, jsxFragmnet, and target options not being set correctly, causing errors on importing a file with jsx in it.

I am happy to submit a PR with updates, but I wanted to confirm the desire for the change and the proposed fixes first.

The proposed update is to replace joycon resolution with a cut-down version of the ts compilers parseConfig function.
This will be similar to what is implemented in the tsconfig-paths tsconfig-loader.ts file, but additionally accounting for node_modules directories in parent directories (emulating or using the node module resolution algorithm).

Let me know what you think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions