Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

configFile option does not support npm module syntax #7

Closed
stephan-noel opened this issue Jul 26, 2020 · 3 comments · Fixed by #9
Closed

configFile option does not support npm module syntax #7

stephan-noel opened this issue Jul 26, 2020 · 3 comments · Fixed by #9
Labels
bug Something isn't working

Comments

@stephan-noel
Copy link
Contributor

Issue Report

{{projectDir}} is supported, however, npm module syntax ie, @some-scope/tsconfig/tsconfig.node.json is causing the error
described here #4 .

Expected Behavior

npm module syntax ie, @some-scope/tsconfig/tsconfig.node.json should be supported as tsc supports this in tsconfig.json files.

Actual Behavior

You get this error:

image (9)

Steps to Reproduce the Issue

  1. Use npm module syntax either directly in the configFile option of the ts-runner or in the extends property of one of the tsconfig files.
  2. Run the ts-runner
@stephan-noel
Copy link
Contributor Author

I've got a manually tested fix, just need to make a unit test for it. I will try to open the MR some time this week.

@beshanoe
Copy link
Contributor

beshanoe commented Jul 27, 2020

In order to support it in the configFile, there needs to be a change in the way path-options are resolved, and in case of "extends" inside tsconfig.json it needs to be done inside the ts-runner. I would for now focus on the latter as it's more used pattern. I don't know if there's a strong use case for passing an npm module to the configFile right away. Although it's probably nice to have feature

@stephan-noel
Copy link
Contributor Author

Oh true. I think I may be able to do it in the surrounding code. I'll try out and test the direct option and see what I come up with.

@danielamaia danielamaia added the bug Something isn't working label Jul 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants