alias-hq icon indicating copy to clipboard operation
alias-hq copied to clipboard

Load should also accept a ready imported TSConfig.

Open seivan opened this issue 3 years ago • 1 comments

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

seivan avatar Jul 06 '22 19:07 seivan

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 avatar Apr 25 '23 21:04 davestewart