{"action":"opened","issue":{"url":"https://api.github.com/repos/storybooks/storybook/issues/4717","repository_url":"https://api.github.com/repos/storybooks/storybook","labels_url":"https://api.github.com/repos/storybooks/storybook/issues/4717/labels{/name}","comments_url":"https://api.github.com/repos/storybooks/storybook/issues/4717/comments","events_url":"https://api.github.com/repos/storybooks/storybook/issues/4717/events","html_url":"https://github.com/storybooks/storybook/issues/4717","id":377366322,"node_id":"MDU6SXNzdWUzNzczNjYzMjI=","number":4717,"title":"CRA's webpack configuration is mangling function names in static build","user":{"login":"jansav","id":3083083,"node_id":"MDQ6VXNlcjMwODMwODM=","avatar_url":"https://avatars0.githubusercontent.com/u/3083083?v=4","gravatar_id":"","url":"https://api.github.com/users/jansav","html_url":"https://github.com/jansav","followers_url":"https://api.github.com/users/jansav/followers","following_url":"https://api.github.com/users/jansav/following{/other_user}","gists_url":"https://api.github.com/users/jansav/gists{/gist_id}","starred_url":"https://api.github.com/users/jansav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jansav/subscriptions","organizations_url":"https://api.github.com/users/jansav/orgs","repos_url":"https://api.github.com/users/jansav/repos","events_url":"https://api.github.com/users/jansav/events{/privacy}","received_events_url":"https://api.github.com/users/jansav/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-05T11:51:14Z","updated_at":"2018-11-05T11:51:14Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\nWhen webpack configuration is used directly when CRA, it causes `build-storybook` to mangle function names. This causes issues that code source and prop types are not presented correctly.\r\n\r\nAs #3879 says, it could be solved by adding `.displayName` to each component, but since CRA is now removing prop types in production builds (https://github.com/facebook/create-react-app/pull/3818), prop types are not visible in static version of storybook.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Create app using Create React App\r\n2. Create functional component and stories for it\r\n2. Install storybook\r\n3. Run`npm run build-storybook` (without having custom webpack configuration)\r\n4. Serve static storybook and see results.\r\n\r\n**Expected behavior**\r\nFunction name is used as display name. Prop types are visible in page.\r\n\r\n**System:**\r\n - Framework: React\r\n - Addons: **Info**, knobs, options\r\n - Version: 4.0.2\r\n\r\n**Additional context**\r\nIt might be that this is something that storybook can't really do anything else than suggest **not** using CRA's webpack configuration directly. However I would like to see if there is any suggestions how to solve this issue without using full control mode. "}}
{"actor":{"display_login":"jansav"}}