File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed
Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "target" : " esnext"
4+ }
5+ }
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " lib/tsconfig.base.json"
3+ }
Original file line number Diff line number Diff line change @@ -1502,6 +1502,10 @@ impl<Fs: FileSystem> ResolverGeneric<Fs> {
15021502 . clone_with_options ( ResolveOptions {
15031503 extensions : vec ! [ ".json" . into( ) ] ,
15041504 main_files : vec ! [ "tsconfig.json" . into( ) ] ,
1505+ #[ cfg( feature = "yarn_pnp" ) ]
1506+ yarn_pnp : self . options . yarn_pnp ,
1507+ #[ cfg( feature = "yarn_pnp" ) ]
1508+ cwd : self . options . cwd . clone ( ) ,
15051509 ..ResolveOptions :: default ( )
15061510 } )
15071511 . load_package_self_or_node_modules ( directory, specifier, & mut Ctx :: default ( ) )
Original file line number Diff line number Diff line change @@ -209,3 +209,17 @@ fn resolve_global_cache() {
209209 . join( "source-map.js" ) ) ,
210210 ) ;
211211}
212+
213+ #[ test]
214+ fn test_resolve_tsconfig_extends_with_pnp ( ) {
215+ let fixture = super :: fixture_root ( ) . join ( "pnp" ) ;
216+ let resolver = Resolver :: new ( ResolveOptions {
217+ cwd : Some ( fixture. clone ( ) ) ,
218+ yarn_pnp : true ,
219+ ..ResolveOptions :: default ( )
220+ } ) ;
221+
222+ let resolution = resolver. resolve_tsconfig ( & fixture) . expect ( "resolved" ) ;
223+ let compiler_options = resolution. compiler_options ( ) ;
224+ assert_eq ! ( compiler_options. target, Some ( "esnext" . to_string( ) ) ) ;
225+ }
You can’t perform that action at this time.
0 commit comments