{"action":"created","issue":{"url":"https://api.github.com/repos/nozzle/react-static/issues/721","repository_url":"https://api.github.com/repos/nozzle/react-static","labels_url":"https://api.github.com/repos/nozzle/react-static/issues/721/labels{/name}","comments_url":"https://api.github.com/repos/nozzle/react-static/issues/721/comments","events_url":"https://api.github.com/repos/nozzle/react-static/issues/721/events","html_url":"https://github.com/nozzle/react-static/issues/721","id":355530165,"node_id":"MDU6SXNzdWUzNTU1MzAxNjU=","number":721,"title":"[v6] [Windows] Paths for components from the pages directory are not handled correctly.","user":{"login":"bkniffler","id":4349324,"node_id":"MDQ6VXNlcjQzNDkzMjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4349324?v=4","gravatar_id":"","url":"https://api.github.com/users/bkniffler","html_url":"https://github.com/bkniffler","followers_url":"https://api.github.com/users/bkniffler/followers","following_url":"https://api.github.com/users/bkniffler/following{/other_user}","gists_url":"https://api.github.com/users/bkniffler/gists{/gist_id}","starred_url":"https://api.github.com/users/bkniffler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkniffler/subscriptions","organizations_url":"https://api.github.com/users/bkniffler/orgs","repos_url":"https://api.github.com/users/bkniffler/repos","events_url":"https://api.github.com/users/bkniffler/events{/privacy}","received_events_url":"https://api.github.com/users/bkniffler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-30T10:49:30Z","updated_at":"2018-09-09T19:16:32Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This error only occurred to me while using Windows, though I guess it is a problem in general.\r\n\r\nPaths do automatically get populated with the files that are found in the pages folder and flagged with `isPage: true`. They will get the full absolute path attached, while my other routes, returne by `getRoutes`, are relative to the website root.  \r\n```\r\n{ path: 'C:/Users/bk/Desktop/Projekte/website/src/pages/404',\r\n  component: 'src\\\\pages\\\\404.js',\r\n  isPage: true }\r\n{ path: '/example-post',\r\n  component: 'src\\\\pages\\\\post.js' }\r\n```\r\n\r\nIn exportRoute.js, these paths are first joined with DIST folder (https://github.com/nozzle/react-static/blob/master/src/static/exportRoute.js#L243) and then written to filesystem (https://github.com/nozzle/react-static/blob/master/src/static/exportRoute.js#L252). The final path will look something like:\r\n\r\n`C:\\Users\\bk\\Desktop\\Projekte\\website\\dist\\C:\\Users\\bk\\Desktop/Projekte\\website\\src\\pages\\404`, while the correct paths from getRoutes look like `C:\\Users\\bk\\Desktop\\Projekte\\website\\dist\\example-post`.\r\n\r\nCurrently, I workaround this error by adding these lines before writing the file to disk\r\n```jsx\r\n            if (route.isPage) {\r\n              return Promise.all([]);\r\n            }\r\n```"},"comment":{"url":"https://api.github.com/repos/nozzle/react-static/issues/comments/419738111","html_url":"https://github.com/nozzle/react-static/issues/721#issuecomment-419738111","issue_url":"https://api.github.com/repos/nozzle/react-static/issues/721","id":419738111,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTczODExMQ==","user":{"login":"bkniffler","id":4349324,"node_id":"MDQ6VXNlcjQzNDkzMjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4349324?v=4","gravatar_id":"","url":"https://api.github.com/users/bkniffler","html_url":"https://github.com/bkniffler","followers_url":"https://api.github.com/users/bkniffler/followers","following_url":"https://api.github.com/users/bkniffler/following{/other_user}","gists_url":"https://api.github.com/users/bkniffler/gists{/gist_id}","starred_url":"https://api.github.com/users/bkniffler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkniffler/subscriptions","organizations_url":"https://api.github.com/users/bkniffler/orgs","repos_url":"https://api.github.com/users/bkniffler/repos","events_url":"https://api.github.com/users/bkniffler/events{/privacy}","received_events_url":"https://api.github.com/users/bkniffler/received_events","type":"User","site_admin":false},"created_at":"2018-09-09T19:16:32Z","updated_at":"2018-09-09T19:16:32Z","author_association":"CONTRIBUTOR","body":"I worked around this now by renaming the pages folder to something else, so the automatic routes are not created."}}
{"actor":{"display_login":"bkniffler"}}