ncc icon indicating copy to clipboard operation
ncc copied to clipboard

add `--tsconfig-path` option for CLI & support `extends` property in `tsconfig.json`

Open nokazn opened this issue 2 years ago • 6 comments

Overview

Hi, there! I've made a PR to add a new CLI option and resolve potential problems. If there is something wrong or missing, feel free to point it out. Thank you.

Changes

  • add --tsconfig-path to specify path to tsconfig.json file for CLI option
    • if path to tsconfig.json is passed by this option, ncc sees that path directly, or if not, ncc resolve path to tsconfig.json as before
  • support extends property in tsconfig.json
    • ~~use officially provided API by TypeScript to resolve and parse compilerOptions & extends property~~
    • ~~add param-case to convert values at jsx option to kebab-case~~
    • use tsconfck to parse tsconfig.json options.

Related

  • resolve #457

nokazn avatar Apr 13 '22 13:04 nokazn

This is a great feature, thanks nokazn! :clap: I hope your work will be merged soon as ncc TS support is incomplete without it. Unfortunately, since ncc lacks preinstall script it's a hassle to use the fork in the meantime.

TheRealBarenziah avatar Jun 01 '22 17:06 TheRealBarenziah

Why is still on hold? Thanks for the PR

mreis1 avatar Jan 20 '23 00:01 mreis1

Hello, when can we expect this to PR to be merged?

YElyousfi avatar Mar 30 '23 23:03 YElyousfi

Very interested in this addition. Is there anything I can do to help get this across the finish line?

steverhoades avatar May 20 '23 14:05 steverhoades

Hello, what's new about this? This is very embarrassing to not be able to set the tsconfig file to use. :/ For example, the NestJs framework standard is to name the tsconfig file tsconfig.build.json for the code only, extending the tsconfig.json file used for code and test. Without this feature, we cannot respect the NestJs standard. :( Regards.

vtgn avatar Jun 15 '23 09:06 vtgn

any update?

wwereal avatar Jul 29 '24 08:07 wwereal