You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output of ts_config() is the same file as was passed in via the tsconfig prop. If said config file makes use of extends, the resulting npm_package contains an incomplete TS config file with dangling extends reference.
Describe the feature
tsc has a --showConfig option that can be used to “flatten” the config. It would be nice if the ts_config would offer to emit that file instead of the original one (although I am not sure how to deal with the file name conflict).
The text was updated successfully, but these errors were encountered:
Can you help me understand the problem with a dangling extends reference? I don't see why an npm package would need to include any tsconfig.json content since downstream users wouldn't reference it when type-checking their apps.
We ran into problems where other tools (that consumed the output of the Bazel build) were inspecting the tsconfig.json (e.g to figure out what transpilation target they were built for) and derived wrong assumptions because those options weren’t present in the tsconfig.json.
Definitely niche and we wrote our our tsconfig_flatten, but I thought I’d flag it with you all :)
@surma what does your tsconfig_flatten rule do? Collect all deps from ts_config targets and output a single JsInfo or filegroup? That seems out of scope for ts_config which is designed to be just that, config for ts, not for files to be shipped in an npm package...
What is the current behavior?
The output of
ts_config()
is the same file as was passed in via thetsconfig
prop. If said config file makes use ofextends
, the resultingnpm_package
contains an incomplete TS config file with danglingextends
reference.Describe the feature
tsc
has a--showConfig
option that can be used to “flatten” the config. It would be nice if thets_config
would offer to emit that file instead of the original one (although I am not sure how to deal with the file name conflict).The text was updated successfully, but these errors were encountered: