{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/create-react-app/pulls/comments/222279670","pull_request_review_id":161125332,"id":222279670,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjI3OTY3MA==","diff_hunk":"@@ -351,7 +363,7 @@ module.exports = {\n             // its runtime that would otherwise be processed through \"file\" loader.\n             // Also exclude `html` and `json` extensions so they get processed\n             // by webpacks internal loaders.\n-            exclude: [/\\.(js|mjs|jsx)$/, /\\.html$/, /\\.json$/],\n+            exclude: [/\\.(js|mjs|jsx|tsx?)$/, /\\.html$/, /\\.json$/],","path":"packages/react-scripts/config/webpack.config.dev.js","position":53,"original_position":53,"commit_id":"567b383a36fd732778bcf37b51a0c570531f7748","original_commit_id":"567b383a36fd732778bcf37b51a0c570531f7748","user":{"login":"RIP21","id":3940079,"node_id":"MDQ6VXNlcjM5NDAwNzk=","avatar_url":"https://avatars1.githubusercontent.com/u/3940079?v=4","gravatar_id":"","url":"https://api.github.com/users/RIP21","html_url":"https://github.com/RIP21","followers_url":"https://api.github.com/users/RIP21/followers","following_url":"https://api.github.com/users/RIP21/following{/other_user}","gists_url":"https://api.github.com/users/RIP21/gists{/gist_id}","starred_url":"https://api.github.com/users/RIP21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIP21/subscriptions","organizations_url":"https://api.github.com/users/RIP21/orgs","repos_url":"https://api.github.com/users/RIP21/repos","events_url":"https://api.github.com/users/RIP21/events{/privacy}","received_events_url":"https://api.github.com/users/RIP21/received_events","type":"User","site_admin":false},"body":"I think it's more clear to write `ts|tsx` rather than `?` they have `js` and `jsx` not `jsx?` so I think the pattern should be preserved everywhere.","created_at":"2018-10-03T11:52:41Z","updated_at":"2018-10-03T11:52:41Z","html_url":"https://github.com/facebook/create-react-app/pull/4837#discussion_r222279670","pull_request_url":"https://api.github.com/repos/facebook/create-react-app/pulls/4837","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/facebook/create-react-app/pulls/comments/222279670"},"html":{"href":"https://github.com/facebook/create-react-app/pull/4837#discussion_r222279670"},"pull_request":{"href":"https://api.github.com/repos/facebook/create-react-app/pulls/4837"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/create-react-app/pulls/4837","id":204661388,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjYxMzg4","html_url":"https://github.com/facebook/create-react-app/pull/4837","diff_url":"https://github.com/facebook/create-react-app/pull/4837.diff","patch_url":"https://github.com/facebook/create-react-app/pull/4837.patch","issue_url":"https://api.github.com/repos/facebook/create-react-app/issues/4837","number":4837,"state":"open","locked":false,"title":"TypeScript support using Babel 7","user":{"login":"brunolemos","id":619186,"node_id":"MDQ6VXNlcjYxOTE4Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/619186?v=4","gravatar_id":"","url":"https://api.github.com/users/brunolemos","html_url":"https://github.com/brunolemos","followers_url":"https://api.github.com/users/brunolemos/followers","following_url":"https://api.github.com/users/brunolemos/following{/other_user}","gists_url":"https://api.github.com/users/brunolemos/gists{/gist_id}","starred_url":"https://api.github.com/users/brunolemos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunolemos/subscriptions","organizations_url":"https://api.github.com/users/brunolemos/orgs","repos_url":"https://api.github.com/users/brunolemos/repos","events_url":"https://api.github.com/users/brunolemos/events{/privacy}","received_events_url":"https://api.github.com/users/brunolemos/received_events","type":"User","site_admin":false},"body":"Adds TypeScript support.\r\n\r\nCloses #4146 \r\nCloses #2815 \r\n\r\nThe user will just need to:\r\n- Create a `tsconfig.json` file at the root directory\r\n- Rename `.js` to `.tsx`\r\n\r\nType checking will appear at the same console as the build one.\r\n\r\n### Includes\r\n\r\n- [x] Make TypeScript work\r\n  - [x] Support `.ts` and `.tsx` file extensions\r\n  - [x] Add `typescript` option to `react-app` babel preset (which enables `@babel/preset-typescript`)\r\n- [x] Nice to have\r\n  - [x] Support `flow` or `typescript` automatically by detecting `.flowconfig` and `tsconfig.json`\r\n  - [x] Prevent enabling both `flow` and `typescript` in the same project\r\n  - [x] Out of the box type checking (using `fork-ts-checker-webpack-plugin`)\r\n  - [x] Out of the box TSLint support (using `fork-ts-checker-webpack-plugin`)\r\n  - [x] Support `tsconfig.prod.json` and `tslint.prod.json`\r\n  - [x] Support media imports like `svg`, `png` and `jpg`\r\n- [x] Update docs\r\n\r\n<!--\r\n> PS: Since September 27th, this PR was updated and the crossed items above were **removed**.\r\n> Also, I rebased with master, which [removed lot's of things](https://github.com/facebook/create-react-app/issues/5024) (monorepo support, ...)\r\n> See [comment](https://github.com/facebook/create-react-app/pull/4837#issuecomment-425034322) below to understand why or to see how to keep using the original PR instead.\r\n-->\r\n\r\n### Screenshot\r\n\r\n```ts\r\ntype TestType = 'a' | 'b'\r\nconst x: TestType = 123\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/619186/46188785-9808f280-c2c1-11e8-9072-a52a0fa668b4.png)\r\n\r\n<!--\r\n![image](https://user-images.githubusercontent.com/619186/46181334-8c0a3a00-c29b-11e8-9eb2-1f3e3d1eacea.png)\r\n-->\r\n\r\n\r\n\r\n### How to try this PR while it's not merged\r\n\r\n- `git clone git@github.com:brunolemos/create-react-app.git`\r\n- `cd create-react-app`\r\n- `git checkout next-typescript`\r\n- `yarn`\r\n- `cd packages/react-scripts/`\r\n- `yarn link`\r\n- `cd ~/your/projects/folder`\r\n- `npx create-react-app@next --scripts-version=2.0.0 app-name`\r\n- `cd app-name`\r\n- `yarn link react-scripts`\r\n- Follow the steps from the readme: [Adding TypeScript](https://github.com/brunolemos/create-react-app/blob/next-typescript/packages/react-scripts/template/README.md#adding-typescript)\r\n- `yarn start`\r\n- Have fun with types 🎉","created_at":"2018-07-29T21:07:14Z","updated_at":"2018-10-03T11:52:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0433a916eb9c4db5c5e41dd3edb59236cd9f40e9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":409579052,"node_id":"MDU6TGFiZWw0MDk1NzkwNTI=","url":"https://api.github.com/repos/facebook/create-react-app/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/create-react-app/pulls/4837/commits","review_comments_url":"https://api.github.com/repos/facebook/create-react-app/pulls/4837/comments","review_comment_url":"https://api.github.com/repos/facebook/create-react-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/create-react-app/issues/4837/comments","statuses_url":"https://api.github.com/repos/facebook/create-react-app/statuses/567b383a36fd732778bcf37b51a0c570531f7748","head":{"label":"brunolemos:next-typescript","ref":"next-typescript","sha":"567b383a36fd732778bcf37b51a0c570531f7748","user":{"login":"brunolemos","id":619186,"node_id":"MDQ6VXNlcjYxOTE4Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/619186?v=4","gravatar_id":"","url":"https://api.github.com/users/brunolemos","html_url":"https://github.com/brunolemos","followers_url":"https://api.github.com/users/brunolemos/followers","following_url":"https://api.github.com/users/brunolemos/following{/other_user}","gists_url":"https://api.github.com/users/brunolemos/gists{/gist_id}","starred_url":"https://api.github.com/users/brunolemos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunolemos/subscriptions","organizations_url":"https://api.github.com/users/brunolemos/orgs","repos_url":"https://api.github.com/users/brunolemos/repos","events_url":"https://api.github.com/users/brunolemos/events{/privacy}","received_events_url":"https://api.github.com/users/brunolemos/received_events","type":"User","site_admin":false},"repo":{"id":142783324,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI3ODMzMjQ=","name":"create-react-app","full_name":"brunolemos/create-react-app","private":false,"owner":{"login":"brunolemos","id":619186,"node_id":"MDQ6VXNlcjYxOTE4Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/619186?v=4","gravatar_id":"","url":"https://api.github.com/users/brunolemos","html_url":"https://github.com/brunolemos","followers_url":"https://api.github.com/users/brunolemos/followers","following_url":"https://api.github.com/users/brunolemos/following{/other_user}","gists_url":"https://api.github.com/users/brunolemos/gists{/gist_id}","starred_url":"https://api.github.com/users/brunolemos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunolemos/subscriptions","organizations_url":"https://api.github.com/users/brunolemos/orgs","repos_url":"https://api.github.com/users/brunolemos/repos","events_url":"https://api.github.com/users/brunolemos/events{/privacy}","received_events_url":"https://api.github.com/users/brunolemos/received_events","type":"User","site_admin":false},"html_url":"https://github.com/brunolemos/create-react-app","description":"Create React apps with no build configuration.","fork":true,"url":"https://api.github.com/repos/brunolemos/create-react-app","forks_url":"https://api.github.com/repos/brunolemos/create-react-app/forks","keys_url":"https://api.github.com/repos/brunolemos/create-react-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brunolemos/create-react-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brunolemos/create-react-app/teams","hooks_url":"https://api.github.com/repos/brunolemos/create-react-app/hooks","issue_events_url":"https://api.github.com/repos/brunolemos/create-react-app/issues/events{/number}","events_url":"https://api.github.com/repos/brunolemos/create-react-app/events","assignees_url":"https://api.github.com/repos/brunolemos/create-react-app/assignees{/user}","branches_url":"https://api.github.com/repos/brunolemos/create-react-app/branches{/branch}","tags_url":"https://api.github.com/repos/brunolemos/create-react-app/tags","blobs_url":"https://api.github.com/repos/brunolemos/create-react-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brunolemos/create-react-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brunolemos/create-react-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/brunolemos/create-react-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brunolemos/create-react-app/statuses/{sha}","languages_url":"https://api.github.com/repos/brunolemos/create-react-app/languages","stargazers_url":"https://api.github.com/repos/brunolemos/create-react-app/stargazers","contributors_url":"https://api.github.com/repos/brunolemos/create-react-app/contributors","subscribers_url":"https://api.github.com/repos/brunolemos/create-react-app/subscribers","subscription_url":"https://api.github.com/repos/brunolemos/create-react-app/subscription","commits_url":"https://api.github.com/repos/brunolemos/create-react-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/brunolemos/create-react-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/brunolemos/create-react-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/brunolemos/create-react-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/brunolemos/create-react-app/contents/{+path}","compare_url":"https://api.github.com/repos/brunolemos/create-react-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brunolemos/create-react-app/merges","archive_url":"https://api.github.com/repos/brunolemos/create-react-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brunolemos/create-react-app/downloads","issues_url":"https://api.github.com/repos/brunolemos/create-react-app/issues{/number}","pulls_url":"https://api.github.com/repos/brunolemos/create-react-app/pulls{/number}","milestones_url":"https://api.github.com/repos/brunolemos/create-react-app/milestones{/number}","notifications_url":"https://api.github.com/repos/brunolemos/create-react-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brunolemos/create-react-app/labels{/name}","releases_url":"https://api.github.com/repos/brunolemos/create-react-app/releases{/id}","deployments_url":"https://api.github.com/repos/brunolemos/create-react-app/deployments","created_at":"2018-07-29T18:00:58Z","updated_at":"2018-10-03T11:12:04Z","pushed_at":"2018-10-03T11:12:00Z","git_url":"git://github.com/brunolemos/create-react-app.git","ssh_url":"git@github.com:brunolemos/create-react-app.git","clone_url":"https://github.com/brunolemos/create-react-app.git","svn_url":"https://github.com/brunolemos/create-react-app","homepage":null,"size":6902,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":1,"default_branch":"next-typescript"}},"base":{"label":"facebook:master","ref":"master","sha":"b41e69662a378c1f851246cfbb94dc068c7f785c","user":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":63537249,"node_id":"MDEwOlJlcG9zaXRvcnk2MzUzNzI0OQ==","name":"create-react-app","full_name":"facebook/create-react-app","private":false,"owner":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/facebook/create-react-app","description":"Create React apps with no build configuration.","fork":false,"url":"https://api.github.com/repos/facebook/create-react-app","forks_url":"https://api.github.com/repos/facebook/create-react-app/forks","keys_url":"https://api.github.com/repos/facebook/create-react-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/create-react-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/create-react-app/teams","hooks_url":"https://api.github.com/repos/facebook/create-react-app/hooks","issue_events_url":"https://api.github.com/repos/facebook/create-react-app/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/create-react-app/events","assignees_url":"https://api.github.com/repos/facebook/create-react-app/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/create-react-app/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/create-react-app/tags","blobs_url":"https://api.github.com/repos/facebook/create-react-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/create-react-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/create-react-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/create-react-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/create-react-app/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/create-react-app/languages","stargazers_url":"https://api.github.com/repos/facebook/create-react-app/stargazers","contributors_url":"https://api.github.com/repos/facebook/create-react-app/contributors","subscribers_url":"https://api.github.com/repos/facebook/create-react-app/subscribers","subscription_url":"https://api.github.com/repos/facebook/create-react-app/subscription","commits_url":"https://api.github.com/repos/facebook/create-react-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/create-react-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/create-react-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/create-react-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/create-react-app/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/create-react-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/create-react-app/merges","archive_url":"https://api.github.com/repos/facebook/create-react-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/create-react-app/downloads","issues_url":"https://api.github.com/repos/facebook/create-react-app/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/create-react-app/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/create-react-app/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/create-react-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/create-react-app/labels{/name}","releases_url":"https://api.github.com/repos/facebook/create-react-app/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/create-react-app/deployments","created_at":"2016-07-17T14:55:11Z","updated_at":"2018-10-03T11:52:04Z","pushed_at":"2018-10-03T11:50:38Z","git_url":"git://github.com/facebook/create-react-app.git","ssh_url":"git@github.com:facebook/create-react-app.git","clone_url":"https://github.com/facebook/create-react-app.git","svn_url":"https://github.com/facebook/create-react-app","homepage":null,"size":6839,"stargazers_count":56630,"watchers_count":56630,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12032,"mirror_url":null,"archived":false,"open_issues_count":381,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":12032,"open_issues":381,"watchers":56630,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/create-react-app/pulls/4837"},"html":{"href":"https://github.com/facebook/create-react-app/pull/4837"},"issue":{"href":"https://api.github.com/repos/facebook/create-react-app/issues/4837"},"comments":{"href":"https://api.github.com/repos/facebook/create-react-app/issues/4837/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/create-react-app/pulls/4837/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/create-react-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/create-react-app/pulls/4837/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/create-react-app/statuses/567b383a36fd732778bcf37b51a0c570531f7748"}},"author_association":"NONE"}}
{"actor":{"display_login":"RIP21"}}