Open NicholasLYang opened 1 week ago
Can you get me a production?
I tried adding a test in the branch https://github.com/oxc-project/oxc-resolver/tree/extend-package
just example /Users/boshen/oxc/oxc-resolver/fixtures/tsconfig/cases/extends-package-tsconfig foo
gives me the tsconfig
[src/lib.rs:1116:9] &tsconfig = TsConfig {
root: true,
path: "/Users/boshen/oxc/oxc-resolver/fixtures/tsconfig/cases/extends-package-tsconfig/tsconfig.json",
extends: Some(
Single(
"tsconfig-index/tsconfig.json",
),
),
compiler_options: CompilerOptions {
base_url: None,
paths: Some(
{
"foo": [
"foo.js",
],
},
),
paths_base: "/Users/boshen/oxc/oxc-resolver/fixtures/tsconfig/node_modules/tsconfig-index",
},
references: [],
}
which seems to be correct because paths_base
is pointing to tsconfig-index
(the "extends": "tsconfig-index/tsconfig.json"
).
If you want to debug yourself:
Resolving extended ts config just reuses the resolver:
So uhh, this is a bit of a cart and a horse situation. You can extend a
tsconfig
using a package, e.g.This doesn't seem to work with
oxc_resolver
, understandably so, since resolving this package import requires...a resolver, which is what we're creating in the first place. But maybe we can do a "best shot" where we use a basic resolver to resolve theextends
key?Thanks!