{"action":"created","comment":{"url":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/comments/90731966","pull_request_review_id":11252856,"id":90731966,"diff_hunk":"@@ -31,20 +30,13 @@ function ensureSlash(path, needsSlash) {\n   }\n }\n \n-// We use \"homepage\" field to infer \"public path\" at which the app is served.\n-// Webpack needs to know it to put the right <script> hrefs into HTML even in\n-// single-page apps that may serve index.html for nested URLs like /todos/42.\n-// We can't use a relative path in HTML because we don't want to load something\n-// like /todos/42/static/js/bundle.7289d.js. We have to know the root.\n-var homepagePath = require(paths.appPackageJson).homepage;\n-var homepagePathname = homepagePath ? url.parse(homepagePath).pathname : '/';\n // Webpack uses `publicPath` to determine where the app is being served from.\n // It requires a trailing slash, or the file assets will get an incorrect path.\n-var publicPath = ensureSlash(homepagePathname, true);\n+var publicPath = ensureSlash(paths.servedPath, true);\n // `publicUrl` is just like `publicPath`, but we will provide it to our app\n // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.\n-// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.\n-var publicUrl = ensureSlash(homepagePathname, false);\n+// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.\n+var publicUrl = ensureSlash(paths.servedPath, false);","path":"packages/react-scripts/config/webpack.config.prod.js","position":28,"original_position":28,"commit_id":"c403dd5a3d3789b6da434037fef6a84d0766a503","original_commit_id":"c403dd5a3d3789b6da434037fef6a84d0766a503","user":{"login":"raycohen","id":20404,"avatar_url":"https://avatars.githubusercontent.com/u/20404?v=3","gravatar_id":"","url":"https://api.github.com/users/raycohen","html_url":"https://github.com/raycohen","followers_url":"https://api.github.com/users/raycohen/followers","following_url":"https://api.github.com/users/raycohen/following{/other_user}","gists_url":"https://api.github.com/users/raycohen/gists{/gist_id}","starred_url":"https://api.github.com/users/raycohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raycohen/subscriptions","organizations_url":"https://api.github.com/users/raycohen/orgs","repos_url":"https://api.github.com/users/raycohen/repos","events_url":"https://api.github.com/users/raycohen/events{/privacy}","received_events_url":"https://api.github.com/users/raycohen/received_events","type":"User","site_admin":false},"body":"similar to how you renamed `var homepagePath` to `var publicUrl` in build.js to match the variable from `paths` that it was being set from, I think you should rename this one to `var servedPath`","created_at":"2016-12-02T22:31:59Z","updated_at":"2016-12-02T22:34:14Z","html_url":"https://github.com/facebookincubator/create-react-app/pull/937#discussion_r90731966","pull_request_url":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/937","_links":{"self":{"href":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/comments/90731966"},"html":{"href":"https://github.com/facebookincubator/create-react-app/pull/937#discussion_r90731966"},"pull_request":{"href":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/937"}}},"pull_request":{"url":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/937","id":90226337,"html_url":"https://github.com/facebookincubator/create-react-app/pull/937","diff_url":"https://github.com/facebookincubator/create-react-app/pull/937.diff","patch_url":"https://github.com/facebookincubator/create-react-app/pull/937.patch","issue_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/937","number":937,"state":"open","locked":false,"title":"Add support for `PUBLIC_URL` env variable","user":{"login":"EnoahNetzach","id":663755,"avatar_url":"https://avatars.githubusercontent.com/u/663755?v=3","gravatar_id":"","url":"https://api.github.com/users/EnoahNetzach","html_url":"https://github.com/EnoahNetzach","followers_url":"https://api.github.com/users/EnoahNetzach/followers","following_url":"https://api.github.com/users/EnoahNetzach/following{/other_user}","gists_url":"https://api.github.com/users/EnoahNetzach/gists{/gist_id}","starred_url":"https://api.github.com/users/EnoahNetzach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EnoahNetzach/subscriptions","organizations_url":"https://api.github.com/users/EnoahNetzach/orgs","repos_url":"https://api.github.com/users/EnoahNetzach/repos","events_url":"https://api.github.com/users/EnoahNetzach/events{/privacy}","received_events_url":"https://api.github.com/users/EnoahNetzach/received_events","type":"User","site_admin":false},"body":"Solves https://github.com/facebookincubator/create-react-app/issues/936, introducing the possibility to specify the `PUBLIC_URL` env variable while running `npm run build`.\n\nWith this PR the `%PUBLIC_URL%` in static assets and the `output.publicPath` variable set in webpack configs follow the following behavior:\n- \"homepage\" specified in `package.json`, `PUBLIC_URL` _not_ set: only the `pathname` is used from \"homepage\" (as it is right now);\n- `PUBLIC_URL` set, \"homepage\" _might_ be set: the full url specified in the env variable is used\n","created_at":"2016-10-20T15:39:55Z","updated_at":"2016-12-02T22:34:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d6f1c8a05b906bfa940f00abf90853b4cbd9a68","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/facebookincubator/create-react-app/milestones/17","html_url":"https://github.com/facebookincubator/create-react-app/milestones/0.8.0","labels_url":"https://api.github.com/repos/facebookincubator/create-react-app/milestones/17/labels","id":2066358,"number":17,"title":"0.8.0","description":"","creator":{"login":"fson","id":497214,"avatar_url":"https://avatars.githubusercontent.com/u/497214?v=3","gravatar_id":"","url":"https://api.github.com/users/fson","html_url":"https://github.com/fson","followers_url":"https://api.github.com/users/fson/followers","following_url":"https://api.github.com/users/fson/following{/other_user}","gists_url":"https://api.github.com/users/fson/gists{/gist_id}","starred_url":"https://api.github.com/users/fson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fson/subscriptions","organizations_url":"https://api.github.com/users/fson/orgs","repos_url":"https://api.github.com/users/fson/repos","events_url":"https://api.github.com/users/fson/events{/privacy}","received_events_url":"https://api.github.com/users/fson/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":33,"state":"open","created_at":"2016-10-12T21:44:18Z","updated_at":"2016-12-01T14:23:31Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/937/commits","review_comments_url":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/937/comments","review_comment_url":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/937/comments","statuses_url":"https://api.github.com/repos/facebookincubator/create-react-app/statuses/c403dd5a3d3789b6da434037fef6a84d0766a503","head":{"label":"EnoahNetzach:master","ref":"master","sha":"c403dd5a3d3789b6da434037fef6a84d0766a503","user":{"login":"EnoahNetzach","id":663755,"avatar_url":"https://avatars.githubusercontent.com/u/663755?v=3","gravatar_id":"","url":"https://api.github.com/users/EnoahNetzach","html_url":"https://github.com/EnoahNetzach","followers_url":"https://api.github.com/users/EnoahNetzach/followers","following_url":"https://api.github.com/users/EnoahNetzach/following{/other_user}","gists_url":"https://api.github.com/users/EnoahNetzach/gists{/gist_id}","starred_url":"https://api.github.com/users/EnoahNetzach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EnoahNetzach/subscriptions","organizations_url":"https://api.github.com/users/EnoahNetzach/orgs","repos_url":"https://api.github.com/users/EnoahNetzach/repos","events_url":"https://api.github.com/users/EnoahNetzach/events{/privacy}","received_events_url":"https://api.github.com/users/EnoahNetzach/received_events","type":"User","site_admin":false},"repo":{"id":71463925,"name":"create-react-app","full_name":"EnoahNetzach/create-react-app","owner":{"login":"EnoahNetzach","id":663755,"avatar_url":"https://avatars.githubusercontent.com/u/663755?v=3","gravatar_id":"","url":"https://api.github.com/users/EnoahNetzach","html_url":"https://github.com/EnoahNetzach","followers_url":"https://api.github.com/users/EnoahNetzach/followers","following_url":"https://api.github.com/users/EnoahNetzach/following{/other_user}","gists_url":"https://api.github.com/users/EnoahNetzach/gists{/gist_id}","starred_url":"https://api.github.com/users/EnoahNetzach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EnoahNetzach/subscriptions","organizations_url":"https://api.github.com/users/EnoahNetzach/orgs","repos_url":"https://api.github.com/users/EnoahNetzach/repos","events_url":"https://api.github.com/users/EnoahNetzach/events{/privacy}","received_events_url":"https://api.github.com/users/EnoahNetzach/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EnoahNetzach/create-react-app","description":"Create React apps with no build configuration.","fork":true,"url":"https://api.github.com/repos/EnoahNetzach/create-react-app","forks_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/forks","keys_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/teams","hooks_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/hooks","issue_events_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/issues/events{/number}","events_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/events","assignees_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/assignees{/user}","branches_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/branches{/branch}","tags_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/tags","blobs_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/statuses/{sha}","languages_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/languages","stargazers_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/stargazers","contributors_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/contributors","subscribers_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/subscribers","subscription_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/subscription","commits_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/contents/{+path}","compare_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/merges","archive_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/downloads","issues_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/issues{/number}","pulls_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/pulls{/number}","milestones_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/milestones{/number}","notifications_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/labels{/name}","releases_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/releases{/id}","deployments_url":"https://api.github.com/repos/EnoahNetzach/create-react-app/deployments","created_at":"2016-10-20T13:05:11Z","updated_at":"2016-10-20T13:05:13Z","pushed_at":"2016-11-25T00:48:15Z","git_url":"git://github.com/EnoahNetzach/create-react-app.git","ssh_url":"git@github.com:EnoahNetzach/create-react-app.git","clone_url":"https://github.com/EnoahNetzach/create-react-app.git","svn_url":"https://github.com/EnoahNetzach/create-react-app","homepage":null,"size":1132,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebookincubator:master","ref":"master","sha":"dc6edce99bc999252757114cb54721928abc28f1","user":{"login":"facebookincubator","id":19538647,"avatar_url":"https://avatars.githubusercontent.com/u/19538647?v=3","gravatar_id":"","url":"https://api.github.com/users/facebookincubator","html_url":"https://github.com/facebookincubator","followers_url":"https://api.github.com/users/facebookincubator/followers","following_url":"https://api.github.com/users/facebookincubator/following{/other_user}","gists_url":"https://api.github.com/users/facebookincubator/gists{/gist_id}","starred_url":"https://api.github.com/users/facebookincubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebookincubator/subscriptions","organizations_url":"https://api.github.com/users/facebookincubator/orgs","repos_url":"https://api.github.com/users/facebookincubator/repos","events_url":"https://api.github.com/users/facebookincubator/events{/privacy}","received_events_url":"https://api.github.com/users/facebookincubator/received_events","type":"Organization","site_admin":false},"repo":{"id":63537249,"name":"create-react-app","full_name":"facebookincubator/create-react-app","owner":{"login":"facebookincubator","id":19538647,"avatar_url":"https://avatars.githubusercontent.com/u/19538647?v=3","gravatar_id":"","url":"https://api.github.com/users/facebookincubator","html_url":"https://github.com/facebookincubator","followers_url":"https://api.github.com/users/facebookincubator/followers","following_url":"https://api.github.com/users/facebookincubator/following{/other_user}","gists_url":"https://api.github.com/users/facebookincubator/gists{/gist_id}","starred_url":"https://api.github.com/users/facebookincubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebookincubator/subscriptions","organizations_url":"https://api.github.com/users/facebookincubator/orgs","repos_url":"https://api.github.com/users/facebookincubator/repos","events_url":"https://api.github.com/users/facebookincubator/events{/privacy}","received_events_url":"https://api.github.com/users/facebookincubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebookincubator/create-react-app","description":"Create React apps with no build configuration.","fork":false,"url":"https://api.github.com/repos/facebookincubator/create-react-app","forks_url":"https://api.github.com/repos/facebookincubator/create-react-app/forks","keys_url":"https://api.github.com/repos/facebookincubator/create-react-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebookincubator/create-react-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebookincubator/create-react-app/teams","hooks_url":"https://api.github.com/repos/facebookincubator/create-react-app/hooks","issue_events_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/events{/number}","events_url":"https://api.github.com/repos/facebookincubator/create-react-app/events","assignees_url":"https://api.github.com/repos/facebookincubator/create-react-app/assignees{/user}","branches_url":"https://api.github.com/repos/facebookincubator/create-react-app/branches{/branch}","tags_url":"https://api.github.com/repos/facebookincubator/create-react-app/tags","blobs_url":"https://api.github.com/repos/facebookincubator/create-react-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebookincubator/create-react-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebookincubator/create-react-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebookincubator/create-react-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebookincubator/create-react-app/statuses/{sha}","languages_url":"https://api.github.com/repos/facebookincubator/create-react-app/languages","stargazers_url":"https://api.github.com/repos/facebookincubator/create-react-app/stargazers","contributors_url":"https://api.github.com/repos/facebookincubator/create-react-app/contributors","subscribers_url":"https://api.github.com/repos/facebookincubator/create-react-app/subscribers","subscription_url":"https://api.github.com/repos/facebookincubator/create-react-app/subscription","commits_url":"https://api.github.com/repos/facebookincubator/create-react-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebookincubator/create-react-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebookincubator/create-react-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebookincubator/create-react-app/contents/{+path}","compare_url":"https://api.github.com/repos/facebookincubator/create-react-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebookincubator/create-react-app/merges","archive_url":"https://api.github.com/repos/facebookincubator/create-react-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebookincubator/create-react-app/downloads","issues_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues{/number}","pulls_url":"https://api.github.com/repos/facebookincubator/create-react-app/pulls{/number}","milestones_url":"https://api.github.com/repos/facebookincubator/create-react-app/milestones{/number}","notifications_url":"https://api.github.com/repos/facebookincubator/create-react-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebookincubator/create-react-app/labels{/name}","releases_url":"https://api.github.com/repos/facebookincubator/create-react-app/releases{/id}","deployments_url":"https://api.github.com/repos/facebookincubator/create-react-app/deployments","created_at":"2016-07-17T14:55:11Z","updated_at":"2016-12-02T22:15:18Z","pushed_at":"2016-12-02T07:08:54Z","git_url":"git://github.com/facebookincubator/create-react-app.git","ssh_url":"git@github.com:facebookincubator/create-react-app.git","clone_url":"https://github.com/facebookincubator/create-react-app.git","svn_url":"https://github.com/facebookincubator/create-react-app","homepage":null,"size":2865,"stargazers_count":15911,"watchers_count":15911,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1542,"mirror_url":null,"open_issues_count":146,"forks":1542,"open_issues":146,"watchers":15911,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/937"},"html":{"href":"https://github.com/facebookincubator/create-react-app/pull/937"},"issue":{"href":"https://api.github.com/repos/facebookincubator/create-react-app/issues/937"},"comments":{"href":"https://api.github.com/repos/facebookincubator/create-react-app/issues/937/comments"},"review_comments":{"href":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/937/comments"},"review_comment":{"href":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebookincubator/create-react-app/pulls/937/commits"},"statuses":{"href":"https://api.github.com/repos/facebookincubator/create-react-app/statuses/c403dd5a3d3789b6da434037fef6a84d0766a503"}}}}
{"actor":{"display_login":"raycohen"}}