Title: Using "resolveJsonModule: true" causes drastic compilation error · Issue #25216 · microsoft/TypeScript · GitHub
Open Graph Title: Using "resolveJsonModule: true" causes drastic compilation error · Issue #25216 · microsoft/TypeScript
X Title: Using "resolveJsonModule: true" causes drastic compilation error · Issue #25216 · microsoft/TypeScript
Description: I am on: Version 2.9.1 So I have this project, with lib and dist and "outDir":"dist" and "include": ["lib"] ... that means the only thing that ends up in dist, should be what's in lib, right? https://github.com/ORESoftware/npm-link-up Th...
Open Graph Description: I am on: Version 2.9.1 So I have this project, with lib and dist and "outDir":"dist" and "include": ["lib"] ... that means the only thing that ends up in dist, should be what's in lib, right? https...
X Description: I am on: Version 2.9.1 So I have this project, with lib and dist and "outDir":"dist" and "include": ["lib"] ... that means the only thing that ends up in dis...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/25216
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using \"resolveJsonModule: true\" causes drastic compilation error","articleBody":"I am on: `Version 2.9.1`\r\n\r\nSo I have this project, with `lib` and `dist` and `\"outDir\":\"dist\"` and `\"include\": [\"lib\"]` ...\r\nthat means the only thing that ends up in dist, should be what's in lib, right?\r\n\r\nhttps://github.com/ORESoftware/npm-link-up\r\n\r\nThis project has a single straightforward tsconfig.json file.\r\n\r\nHow to replicate the problem :\r\n\r\n> 1. git clone https://github.com/ORESoftware/npm-link-up.git\r\n> 2. rm -rf dist\r\n> 3. tsc \r\n> 4. dist should have some 20+ files in it. These files are the correct files.\r\n> 5. rm -rf dist\r\n> 6. change `\"resolveJsonModule\": false`, to `\"resolveJsonModule\": true`\r\n> 7. tsc\r\n> 8. now dist should have about 3 files in it. These files are the *incorrect* files.\r\n\r\nI would assume that `\"resolveJsonModule\": true` would not do that much except allow you to do:\r\n\r\n```js\r\nimport json = require('../../my.file.json');\r\nconst jsonType = typeof json;\r\n```\r\n\r\nI don't see why it should have such a drastic affect on what goes from lib into dist.\r\n\r\n","author":{"url":"https://github.com/ORESoftware","@type":"Person","name":"ORESoftware"},"datePublished":"2018-06-26T03:40:54Z","url":"https://github.com/microsoft/TypeScript/issues/25216"}
| 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:8d0c7d51-e4c0-02d0-096f-6224afbc6cee |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BCDA:60929:3BE4F:4E50B:6B01AF49 |
| html-safe-nonce | ccf85fac4c3f90f2caa6f1797a3e1e8f9c86ac359f5fbffed989381996e3a087 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0RBOjYwOTI5OjNCRTRGOjRFNTBCOjZCMDFBRjQ5IiwidmlzaXRvcl9pZCI6IjI5ODQyMjQzNjgwMzg2MjEwMDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 28b418259e87f229f779701ebc5abbdffbd676bf10b63bbe851a43e41bb6f9fe |
| hovercard-subject-tag | issue:335647055 |
| 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/25216/issue_layout |
| twitter:image | https://opengraph.githubassets.com/da8d0551fe6bad429a38eb985dd846b8724a0dcbafca3e7940349d74058b0f56/microsoft/TypeScript/issues/25216 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/da8d0551fe6bad429a38eb985dd846b8724a0dcbafca3e7940349d74058b0f56/microsoft/TypeScript/issues/25216 |
| og:image:alt | I am on: Version 2.9.1 So I have this project, with lib and dist and "outDir":"dist" and "include": ["lib"] ... that means the only thing that ends up in dist, should be what's in lib, right? https... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ORESoftware |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width