{"action":"created","issue":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/253","repository_url":"https://api.github.com/repos/gatsbyjs/gatsby","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/253/labels{/name}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/253/comments","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/253/events","html_url":"https://github.com/gatsbyjs/gatsby/pull/253","id":150199855,"number":253,"title":"Webpack config refactor; CSS now generated with HTML","user":{"login":"scottnonnenberg","id":443005,"avatar_url":"https://avatars.githubusercontent.com/u/443005?v=3","gravatar_id":"","url":"https://api.github.com/users/scottnonnenberg","html_url":"https://github.com/scottnonnenberg","followers_url":"https://api.github.com/users/scottnonnenberg/followers","following_url":"https://api.github.com/users/scottnonnenberg/following{/other_user}","gists_url":"https://api.github.com/users/scottnonnenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/scottnonnenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottnonnenberg/subscriptions","organizations_url":"https://api.github.com/users/scottnonnenberg/orgs","repos_url":"https://api.github.com/users/scottnonnenberg/repos","events_url":"https://api.github.com/users/scottnonnenberg/events{/privacy}","received_events_url":"https://api.github.com/users/scottnonnenberg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-04-21T21:49:42Z","updated_at":"2016-05-08T04:33:57Z","closed_at":"2016-05-08T04:32:12Z","pull_request":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/253","html_url":"https://github.com/gatsbyjs/gatsby/pull/253","diff_url":"https://github.com/gatsbyjs/gatsby/pull/253.diff","patch_url":"https://github.com/gatsbyjs/gatsby/pull/253.patch"},"body":"I realized that the `noProductionJavascript` option wasn't quite right because it still generates a weird unminified `public/bundle.js`, and you get no generated `styles.css`. This pull request changes that.\r\n\r\nFirst, it makes the three stages in `util/webpack.config.js` a little easier to understand, renaming them to:\r\n\r\n1. develop\r\n2. build-static\r\n3. build-spa\r\n\r\nSecond, it moves `styles.css` generation to Stage 2, the 'build-static' stage.\r\n\r\nThird, it renames the temp webpack-generated file required by `static-site-generator-webpack-plugin` (previously `public/bundle.js`, so it was overwritten by the final webpack stage) to `public/render-page.js` and deletes it when Stage 2 is complete."},"comment":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/comments/217690810","html_url":"https://github.com/gatsbyjs/gatsby/pull/253#issuecomment-217690810","issue_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/253","id":217690810,"user":{"login":"KyleAMathews","id":71047,"avatar_url":"https://avatars.githubusercontent.com/u/71047?v=3","gravatar_id":"","url":"https://api.github.com/users/KyleAMathews","html_url":"https://github.com/KyleAMathews","followers_url":"https://api.github.com/users/KyleAMathews/followers","following_url":"https://api.github.com/users/KyleAMathews/following{/other_user}","gists_url":"https://api.github.com/users/KyleAMathews/gists{/gist_id}","starred_url":"https://api.github.com/users/KyleAMathews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KyleAMathews/subscriptions","organizations_url":"https://api.github.com/users/KyleAMathews/orgs","repos_url":"https://api.github.com/users/KyleAMathews/repos","events_url":"https://api.github.com/users/KyleAMathews/events{/privacy}","received_events_url":"https://api.github.com/users/KyleAMathews/received_events","type":"User","site_admin":false},"created_at":"2016-05-08T04:33:57Z","updated_at":"2016-05-08T04:33:57Z","body":"I'm going to merge this for now. The ~33% speed decrease we can fix later by just building the bundle.js in another process (https://github.com/sindresorhus/execa looks nice). "}}