Title: Add settings for multiple environments in tsconfig.json · Issue #9835 · microsoft/TypeScript · GitHub
Open Graph Title: Add settings for multiple environments in tsconfig.json · Issue #9835 · microsoft/TypeScript
X Title: Add settings for multiple environments in tsconfig.json · Issue #9835 · microsoft/TypeScript
Description: Suggestion In order to compile development, test, and production builds as part of a larger pipeline As a team project build administrator I want to be able to define different compiler settings for different environments in tsconfig.jso...
Open Graph Description: Suggestion In order to compile development, test, and production builds as part of a larger pipeline As a team project build administrator I want to be able to define different compiler settings fo...
X Description: Suggestion In order to compile development, test, and production builds as part of a larger pipeline As a team project build administrator I want to be able to define different compiler settings fo...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/9835
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add settings for multiple environments in tsconfig.json","articleBody":"## Suggestion\n\n> **In order to** compile `development`, `test`, and `production` builds as part of a larger pipeline\n> **As a** team project build administrator\n> **I want** to be able to define different compiler settings for different environments in `tsconfig.json`\n\nProvide a feature similar to the [`babelrc` file `env` option](https://babeljs.io/docs/usage/babelrc/) so one `tsconfig.json` file can support multiple environments. It is very cumbersome to have to maintain multiple `tsconfig.json` just so a few options can differ.\n## Scenario\n\nFor [latticework/jali](https://github.com/latticework/jali), we use [ava](https://github.com/avajs/ava) for unit testing which requires inline source maps to integrate with it's use of the Babel transpiler. However some of our code will be in a browser, and, for production use, we don't want have inline source maps in that scenario. It appears that now we have no recourse but to specify the source map option on the command line since (1) `--sourceMap` and `--inlineSourceMap` are incompatable and (2) there is [no way for a user to turn **off** a Boolean option from the command line](https://github.com/Microsoft/TypeScript/blob/80db0f2f166d0a3547319fce789c31604e8fc83b/src/compiler/commandLineParser.ts#L576).\n## Prior Art\n- Babel [supports the `env` property in `babelrc`](https://babeljs.io/docs/usage/babelrc/) and in `project.json` so that the settings for each environment can be supported.\n## Prior Discussion\n\n> # 3645 Support for multiple tsconfig.json per project\n> # 6109 Proposal: Support for multiple tsconfig.json per project\n> # 8500 Support multiple tsconfig files for different environments\n\nA [recent comment](https://github.com/Microsoft/TypeScript/issues/3645#issuecomment-221773972) for #3645, made after the issue was closed, comes close to this idea.\n","author":{"url":"https://github.com/clavecoder","@type":"Person","name":"clavecoder"},"datePublished":"2016-07-20T02:31:57Z","url":"https://github.com/microsoft/TypeScript/issues/9835"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:57004f6a-8135-1e8e-36f5-6e872a467753 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C09C:134361:71F73B:982017:6B00D752 |
| html-safe-nonce | 1eed231f6fe9c8bdbb7e2ecd30082c75ccd910cc13d14ea61dfca7c5434307a9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDlDOjEzNDM2MTo3MUY3M0I6OTgyMDE3OjZCMDBENzUyIiwidmlzaXRvcl9pZCI6IjE0NTk0NDg1MDMzNjQyNzgwOTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8260e528d2363e8efda047554e1241410eda5cdac8581690ec1a2252c92dc1cb |
| hovercard-subject-tag | issue:166481205 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/9835/issue_layout |
| twitter:image | https://opengraph.githubassets.com/925b4494745f7f3e74a749a675e28d4bb19167e7031bacbbf4d3f15445854b3a/microsoft/TypeScript/issues/9835 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/925b4494745f7f3e74a749a675e28d4bb19167e7031bacbbf4d3f15445854b3a/microsoft/TypeScript/issues/9835 |
| og:image:alt | Suggestion In order to compile development, test, and production builds as part of a larger pipeline As a team project build administrator I want to be able to define different compiler settings fo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | clavecoder |
| hostname | github.com |
| expected-hostname | github.com |
| None | a481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 84c8c5cc25e2fb7f2308428458538436baecc6d2 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width