{"action":"created","issue":{"url":"https://api.github.com/repos/zeit/next.js/issues/4833","repository_url":"https://api.github.com/repos/zeit/next.js","labels_url":"https://api.github.com/repos/zeit/next.js/issues/4833/labels{/name}","comments_url":"https://api.github.com/repos/zeit/next.js/issues/4833/comments","events_url":"https://api.github.com/repos/zeit/next.js/issues/4833/events","html_url":"https://github.com/zeit/next.js/issues/4833","id":344306897,"node_id":"MDU6SXNzdWUzNDQzMDY4OTc=","number":4833,"title":"when jumping among pages, styles lost","user":{"login":"wslx520","id":1026909,"node_id":"MDQ6VXNlcjEwMjY5MDk=","avatar_url":"https://avatars0.githubusercontent.com/u/1026909?v=4","gravatar_id":"","url":"https://api.github.com/users/wslx520","html_url":"https://github.com/wslx520","followers_url":"https://api.github.com/users/wslx520/followers","following_url":"https://api.github.com/users/wslx520/following{/other_user}","gists_url":"https://api.github.com/users/wslx520/gists{/gist_id}","starred_url":"https://api.github.com/users/wslx520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wslx520/subscriptions","organizations_url":"https://api.github.com/users/wslx520/orgs","repos_url":"https://api.github.com/users/wslx520/repos","events_url":"https://api.github.com/users/wslx520/events{/privacy}","received_events_url":"https://api.github.com/users/wslx520/received_events","type":"User","site_admin":false},"labels":[{"id":475935585,"node_id":"MDU6TGFiZWw0NzU5MzU1ODU=","url":"https://api.github.com/repos/zeit/next.js/labels/good%20first%20issue","name":"good first issue","color":"1BDF7E","default":true},{"id":455907198,"node_id":"MDU6TGFiZWw0NTU5MDcxOTg=","url":"https://api.github.com/repos/zeit/next.js/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-07-25T06:16:07Z","updated_at":"2018-08-01T01:03:38Z","closed_at":"2018-07-31T14:28:37Z","author_association":"NONE","body":"# Bug report\r\n\r\n## Describe the bug\r\n\r\nI found this bug in `with-ant-design` example. but I think it's not a bug of example, it's a bug of next.js.\r\n\r\nIn this example, there is only one page, so it works fine. but, when built one more page, and jump between pages, you can find styles lost.\r\n\r\n## To Reproduce\r\n\r\n1. run the `with-ant-design` example properly (by `npm run dev`). It looks good:\r\n![image](https://user-images.githubusercontent.com/1026909/43182052-6fba4b44-9012-11e8-8752-5c3308be7054.png)\r\n\r\n\r\n2. build one more page (named: `other`), and create a link between them. here is `other.js` source:\r\n\r\n```javascript\r\nimport Layout from '../index.js'\r\nimport Link from 'next/link'\r\nimport { Select, Button } from 'antd'\r\nconst Option = Select.Option\r\nexport default () => (\r\n    <Layout>\r\n        <div style={{ marginTop: 100 }}>\r\n            <Link href=\"/\"><Button>Back to main</Button></Link>\r\n            <Select>\r\n                <Option value={null}>请选择</Option>\r\n            </Select>\r\n        </div>\r\n    </Layout>\r\n)\r\n```\r\nnothing special\r\n\r\n3. at main page, click the link to `other`, and then, click the `Back to main` to go back. then you can see the styles are not corrent:\r\n\r\n![image](https://user-images.githubusercontent.com/1026909/43182256-494bc04a-9013-11e8-9c81-fa2db08b4082.png)\r\n\r\nactually, **all of those components which haven't been imported by the `other.js` page are lost**.\r\n\r\nand when this occurs, you can do nothing to get the styles back, but only by restart `npm run dev`\r\n\r\n## Expected behavior\r\nI have tried more UI framework such as 'zent', and got into the same problem. so I think it's not a bug of antd\r\n\r\nI hope the styles can work properly, wherever they were imported.\r\n\r\n## System information\r\n - OS: Windows 10\r\n - Version of Next.js: 6.1.1\r\n"},"comment":{"url":"https://api.github.com/repos/zeit/next.js/issues/comments/409415173","html_url":"https://github.com/zeit/next.js/issues/4833#issuecomment-409415173","issue_url":"https://api.github.com/repos/zeit/next.js/issues/4833","id":409415173,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTQxNTE3Mw==","user":{"login":"qbf75196","id":41976068,"node_id":"MDQ6VXNlcjQxOTc2MDY4","avatar_url":"https://avatars3.githubusercontent.com/u/41976068?v=4","gravatar_id":"","url":"https://api.github.com/users/qbf75196","html_url":"https://github.com/qbf75196","followers_url":"https://api.github.com/users/qbf75196/followers","following_url":"https://api.github.com/users/qbf75196/following{/other_user}","gists_url":"https://api.github.com/users/qbf75196/gists{/gist_id}","starred_url":"https://api.github.com/users/qbf75196/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qbf75196/subscriptions","organizations_url":"https://api.github.com/users/qbf75196/orgs","repos_url":"https://api.github.com/users/qbf75196/repos","events_url":"https://api.github.com/users/qbf75196/events{/privacy}","received_events_url":"https://api.github.com/users/qbf75196/received_events","type":"User","site_admin":false},"created_at":"2018-08-01T01:03:38Z","updated_at":"2018-08-01T01:03:38Z","author_association":"NONE","body":"Hi @wslx520, I have next ver 6.1.1 and next-css ver 0.2.0 but I still have the issue with style disappearing. How did you fix it?"}}
{"actor":{"display_login":"qbf75196"}}