cjs-loader icon indicating copy to clipboard operation
cjs-loader copied to clipboard

chore: upgrade get-tsconfig

Open npdev453 opened this issue 2 years ago • 6 comments

npdev453 avatar Aug 12 '23 05:08 npdev453

https://github.com/esbuild-kit/cjs-loader/pull/36

npdev453 avatar Aug 12 '23 05:08 npdev453

Can you add the new caching that comes with the new get-tsconfig?

privatenumber avatar Aug 12 '23 08:08 privatenumber

Can you add the new caching that comes with the new get-tsconfig?

Sure, but can you provide some explain in two words? I as can see than I can pass Map in third arg now, but how it should works inside context of this loader module where getTsconfig called just once (on start)?

npdev453 avatar Aug 12 '23 08:08 npdev453

Yeah, just pass in a Map as the second or third argument. Here's a reference: https://github.com/esbuild-kit/esbuild-loader/commit/544f4bdbdfc10b4d8b3da467c6c243f5d6f5630f

privatenumber avatar Aug 12 '23 10:08 privatenumber

Yeah, just pass in a Map as the second or third argument. Here's a reference: esbuild-kit/esbuild-loader@544f4bd

Done, but still not clear for me or is it just a foundation for the future?

npdev453 avatar Aug 12 '23 11:08 npdev453

True, in this case it doesn't appear to be necessary right now.

But yeah, it sets us up for the future where we want the tsconfig to be looked up for each file in multi-tsconfig projects.

privatenumber avatar Aug 12 '23 11:08 privatenumber