{"action":"created","issue":{"url":"https://api.github.com/repos/zeit/next.js/issues/3134","repository_url":"https://api.github.com/repos/zeit/next.js","labels_url":"https://api.github.com/repos/zeit/next.js/issues/3134/labels{/name}","comments_url":"https://api.github.com/repos/zeit/next.js/issues/3134/comments","events_url":"https://api.github.com/repos/zeit/next.js/issues/3134/events","html_url":"https://github.com/zeit/next.js/issues/3134","id":267014989,"number":3134,"title":"Production build not minified","user":{"login":"tweeres04","id":216874,"avatar_url":"https://avatars1.githubusercontent.com/u/216874?v=4","gravatar_id":"","url":"https://api.github.com/users/tweeres04","html_url":"https://github.com/tweeres04","followers_url":"https://api.github.com/users/tweeres04/followers","following_url":"https://api.github.com/users/tweeres04/following{/other_user}","gists_url":"https://api.github.com/users/tweeres04/gists{/gist_id}","starred_url":"https://api.github.com/users/tweeres04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tweeres04/subscriptions","organizations_url":"https://api.github.com/users/tweeres04/orgs","repos_url":"https://api.github.com/users/tweeres04/repos","events_url":"https://api.github.com/users/tweeres04/events{/privacy}","received_events_url":"https://api.github.com/users/tweeres04/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2017-10-19T22:59:07Z","updated_at":"2018-02-08T18:19:02Z","closed_at":"2017-10-20T07:49:31Z","author_association":"NONE","body":"<!--- Provide a general summary of the issue in the Title above -->\r\n\r\n<!--\r\n    Thank you very much for contributing to Next.js by creating an issue! ❤️\r\n    To avoid duplicate issues we ask you to check off the following list\r\n-->\r\n\r\n<!-- Checked checkbox should look like this: [x] -->\r\n- [x] I have searched the [issues](https://github.com/zeit/next.js/issues) of this repository and believe that this is not a duplicate.\r\n\r\n## Expected Behavior\r\nWhen I'm deploying a production build, I should have minified javascript code in order to minimize file size and maximize performance.\r\n<!--- If you're describing a bug, tell us what should happen -->\r\n<!--- If you're suggesting a change/improvement, tell us how it should work -->\r\n\r\n## Current Behavior\r\nMy app.js is 529KB and not minified\r\n<!--- If describing a bug, tell us what happens instead of the expected behavior -->\r\n<!--- If suggesting a change/improvement, explain the difference from current behavior -->\r\n\r\n## Steps to Reproduce (for bugs)\r\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\r\n<!--- reproduce this bug. Include code to reproduce, if relevant -->\r\n1. `next build`\r\n2. `next start`\r\n\r\nOR\r\n\r\n1. `next build`\r\n2. `next export`\r\n\r\n## Context\r\nI wanted to use next.js in order to have a lightning fast site as advertised but no minification kills that. I'm sure I'm missing something simple.\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n| Tech    | Version |\r\n|---------|---------|\r\n| next    |  4.1.1       |\r\n| node    |   8.4.0      |\r\n| OS      |   MacOS Sierra 10.12.6       |\r\n| browser |   Chrome      |\r\n| etc     |    React and react-dom 16     |\r\n"},"comment":{"url":"https://api.github.com/repos/zeit/next.js/issues/comments/364201947","html_url":"https://github.com/zeit/next.js/issues/3134#issuecomment-364201947","issue_url":"https://api.github.com/repos/zeit/next.js/issues/3134","id":364201947,"user":{"login":"timneutkens","id":6324199,"avatar_url":"https://avatars2.githubusercontent.com/u/6324199?v=4","gravatar_id":"","url":"https://api.github.com/users/timneutkens","html_url":"https://github.com/timneutkens","followers_url":"https://api.github.com/users/timneutkens/followers","following_url":"https://api.github.com/users/timneutkens/following{/other_user}","gists_url":"https://api.github.com/users/timneutkens/gists{/gist_id}","starred_url":"https://api.github.com/users/timneutkens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timneutkens/subscriptions","organizations_url":"https://api.github.com/users/timneutkens/orgs","repos_url":"https://api.github.com/users/timneutkens/repos","events_url":"https://api.github.com/users/timneutkens/events{/privacy}","received_events_url":"https://api.github.com/users/timneutkens/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T18:19:02Z","updated_at":"2018-02-08T18:19:02Z","author_association":"OWNER","body":"It's extremely hard to get this message with v5. The only way I'm aware of is removing the react aliases in your next.config.js.\r\nEarlier today someone on slack said he saw the warning.\r\nTurned out he had this in his next.config.js:\r\n\r\n```\r\nif (config.resolve.alias) {\r\n      delete config.resolve.alias.react\r\n      delete config.resolve.alias['react-dom']\r\n    }\r\n```\r\n\r\nTo be clear. React doesn't require minification anymore. If you're using React 16+ the React is already minified when published on npm, the message is purely to point out that there *might* be something wrong with the transpilation. In our case we made the choice to not minify minified code and alias to the right bundle in dev/prod automatically. This saves ~20seconds with builds for us in production. And we avoid doing unneeded work.\r\n\r\nIf you removed the aliases because you have code using react-dom/server on the client side you can upgrade to `next@canary` which will be released as master soon 🙏 "}}
{"actor":{"display_login":"timneutkens"}}