{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/create-react-app/issues/5573","repository_url":"https://api.github.com/repos/facebook/create-react-app","labels_url":"https://api.github.com/repos/facebook/create-react-app/issues/5573/labels{/name}","comments_url":"https://api.github.com/repos/facebook/create-react-app/issues/5573/comments","events_url":"https://api.github.com/repos/facebook/create-react-app/issues/5573/events","html_url":"https://github.com/facebook/create-react-app/pull/5573","id":374184395,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1OTQ0ODYz","number":5573,"title":"fix named-asset-import plugin to work with export-as syntax","user":{"login":"NShahri","id":2850493,"node_id":"MDQ6VXNlcjI4NTA0OTM=","avatar_url":"https://avatars2.githubusercontent.com/u/2850493?v=4","gravatar_id":"","url":"https://api.github.com/users/NShahri","html_url":"https://github.com/NShahri","followers_url":"https://api.github.com/users/NShahri/followers","following_url":"https://api.github.com/users/NShahri/following{/other_user}","gists_url":"https://api.github.com/users/NShahri/gists{/gist_id}","starred_url":"https://api.github.com/users/NShahri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NShahri/subscriptions","organizations_url":"https://api.github.com/users/NShahri/orgs","repos_url":"https://api.github.com/users/NShahri/repos","events_url":"https://api.github.com/users/NShahri/events{/privacy}","received_events_url":"https://api.github.com/users/NShahri/received_events","type":"User","site_admin":false},"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},{"id":492694089,"node_id":"MDU6TGFiZWw0OTI2OTQwODk=","url":"https://api.github.com/repos/facebook/create-react-app/labels/tag:%20bug%20fix","name":"tag: bug fix","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":{"login":"iansu","id":433725,"node_id":"MDQ6VXNlcjQzMzcyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/433725?v=4","gravatar_id":"","url":"https://api.github.com/users/iansu","html_url":"https://github.com/iansu","followers_url":"https://api.github.com/users/iansu/followers","following_url":"https://api.github.com/users/iansu/following{/other_user}","gists_url":"https://api.github.com/users/iansu/gists{/gist_id}","starred_url":"https://api.github.com/users/iansu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iansu/subscriptions","organizations_url":"https://api.github.com/users/iansu/orgs","repos_url":"https://api.github.com/users/iansu/repos","events_url":"https://api.github.com/users/iansu/events{/privacy}","received_events_url":"https://api.github.com/users/iansu/received_events","type":"User","site_admin":false},"assignees":[{"login":"iansu","id":433725,"node_id":"MDQ6VXNlcjQzMzcyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/433725?v=4","gravatar_id":"","url":"https://api.github.com/users/iansu","html_url":"https://github.com/iansu","followers_url":"https://api.github.com/users/iansu/followers","following_url":"https://api.github.com/users/iansu/following{/other_user}","gists_url":"https://api.github.com/users/iansu/gists{/gist_id}","starred_url":"https://api.github.com/users/iansu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iansu/subscriptions","organizations_url":"https://api.github.com/users/iansu/orgs","repos_url":"https://api.github.com/users/iansu/repos","events_url":"https://api.github.com/users/iansu/events{/privacy}","received_events_url":"https://api.github.com/users/iansu/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/facebook/create-react-app/milestones/59","html_url":"https://github.com/facebook/create-react-app/milestone/59","labels_url":"https://api.github.com/repos/facebook/create-react-app/milestones/59/labels","id":3787081,"node_id":"MDk6TWlsZXN0b25lMzc4NzA4MQ==","number":59,"title":"2.1.2","description":"","creator":{"login":"Timer","id":616428,"node_id":"MDQ6VXNlcjYxNjQyOA==","avatar_url":"https://avatars1.githubusercontent.com/u/616428?v=4","gravatar_id":"","url":"https://api.github.com/users/Timer","html_url":"https://github.com/Timer","followers_url":"https://api.github.com/users/Timer/followers","following_url":"https://api.github.com/users/Timer/following{/other_user}","gists_url":"https://api.github.com/users/Timer/gists{/gist_id}","starred_url":"https://api.github.com/users/Timer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Timer/subscriptions","organizations_url":"https://api.github.com/users/Timer/orgs","repos_url":"https://api.github.com/users/Timer/repos","events_url":"https://api.github.com/users/Timer/events{/privacy}","received_events_url":"https://api.github.com/users/Timer/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":21,"state":"open","created_at":"2018-11-01T03:36:29Z","updated_at":"2018-11-20T16:00:30Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2018-10-26T00:38:04Z","updated_at":"2018-11-20T16:00:35Z","closed_at":"2018-11-20T16:00:30Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/facebook/create-react-app/pulls/5573","html_url":"https://github.com/facebook/create-react-app/pull/5573","diff_url":"https://github.com/facebook/create-react-app/pull/5573.diff","patch_url":"https://github.com/facebook/create-react-app/pull/5573.patch"},"body":"The following code doesn't work\r\n```js\r\nexport {ReactComponent as LogoIcon} from './logo.svg';\r\n```\r\n\r\n![case-2-error-message](https://user-images.githubusercontent.com/2850493/47537600-2903d580-d923-11e8-8b04-e11617194f7d.png)\r\n\r\nBut it will work:\r\n```\r\nimport {ReactComponent as LogoIcon} from './logo.svg';\r\nexport {LogoIcon};\r\n```\r\n\r\n### Sample Project: \r\nhttps://github.com/NShahri/create-react-app-export-named-assets\r\n\r\n### Result:\r\n**ORIGINAL**:  When there is no change in the project which is created by CRA\r\nhttps://github.com/NShahri/create-react-app-export-named-assets/blob/master/test-results/main.e0244443.chunk-original.js\r\n\r\n**CASE 1**: Change to `import {ReactComponent as LogoIcon} from './logo.svg'; {LogoIcon};`\r\nhttps://github.com/NShahri/create-react-app-export-named-assets/blob/master/test-results/main.35c51289.chunk-case-1.js\r\n\r\n**CASE 2**: change to `export {ReactComponent as LogoIcon} from './logo.svg';`\r\nhttps://github.com/NShahri/create-react-app-export-named-assets/blob/master/test-results/main.0cd4b7da.chunk-case-2.js#L32\r\n\r\n**CASE 2 with new named-assets-import plugin**:\r\nhttps://github.com/NShahri/create-react-app-export-named-assets/blob/master/test-results/main.92516e27.chunk-case-2-new-named-assets-plugin.js\r\n\r\n ### Note\r\n`CASE 1` and `CASE 2 with new named-assets-import plugin` are identical."},"comment":{"url":"https://api.github.com/repos/facebook/create-react-app/issues/comments/440325861","html_url":"https://github.com/facebook/create-react-app/pull/5573#issuecomment-440325861","issue_url":"https://api.github.com/repos/facebook/create-react-app/issues/5573","id":440325861,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDMyNTg2MQ==","user":{"login":"iansu","id":433725,"node_id":"MDQ6VXNlcjQzMzcyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/433725?v=4","gravatar_id":"","url":"https://api.github.com/users/iansu","html_url":"https://github.com/iansu","followers_url":"https://api.github.com/users/iansu/followers","following_url":"https://api.github.com/users/iansu/following{/other_user}","gists_url":"https://api.github.com/users/iansu/gists{/gist_id}","starred_url":"https://api.github.com/users/iansu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iansu/subscriptions","organizations_url":"https://api.github.com/users/iansu/orgs","repos_url":"https://api.github.com/users/iansu/repos","events_url":"https://api.github.com/users/iansu/events{/privacy}","received_events_url":"https://api.github.com/users/iansu/received_events","type":"User","site_admin":false},"created_at":"2018-11-20T16:00:35Z","updated_at":"2018-11-20T16:00:35Z","author_association":"COLLABORATOR","body":"Thanks!"}}
{"actor":{"display_login":"iansu"}}