Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load should also accept a ready imported TSConfig. #54

Open
seivan opened this issue Jul 6, 2022 · 1 comment
Open

Load should also accept a ready imported TSConfig. #54

seivan opened this issue Jul 6, 2022 · 1 comment
Labels
question Further information is requested

Comments

@seivan
Copy link

seivan commented Jul 6, 2022

In my case I am importing a TSconfig for other stuff in the build script, and I don't see why I couldn't just pass the JSON directly to the loading, instead of giving it a name instead?

import * as TSconfig from "./tsconfig.dir.json"

Btw, you got the right idea here.
There needs to be a single source of truth for these things, and all the other libraries need to just infer from it.
Every other library seems to spread thoses aliases into different parts.

Personally, I think Yarn (Berry) has it right, by keeping the aliases as the other packages, but it doesn't work so well with Rollup.

TSConfig is the next best thing

@davestewart
Copy link
Owner

Hey, sorry for missing this! Been a busy 12 months.

So you're asking to directly pass a complete JSON object to the load method?

Are you asking for this as a performance gain, or perhaps you're doing some parsing first?

Just trying to work out why you want it...

@davestewart davestewart added the question Further information is requested label Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants