{"action":"opened","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/1526","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/1526/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/1526/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/1526/events","html_url":"https://github.com/ant-design/ant-design/issues/1526","id":151324932,"number":1526,"title":"react-router使用webpack的require.ensure动态加载问题","user":{"login":"flicker85","id":5960708,"avatar_url":"https://avatars.githubusercontent.com/u/5960708?v=3","gravatar_id":"","url":"https://api.github.com/users/flicker85","html_url":"https://github.com/flicker85","followers_url":"https://api.github.com/users/flicker85/followers","following_url":"https://api.github.com/users/flicker85/following{/other_user}","gists_url":"https://api.github.com/users/flicker85/gists{/gist_id}","starred_url":"https://api.github.com/users/flicker85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flicker85/subscriptions","organizations_url":"https://api.github.com/users/flicker85/orgs","repos_url":"https://api.github.com/users/flicker85/repos","events_url":"https://api.github.com/users/flicker85/events{/privacy}","received_events_url":"https://api.github.com/users/flicker85/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-27T08:12:55Z","updated_at":"2016-04-27T08:12:55Z","closed_at":null,"body":"react-router使用webpack的require.ensure动态加载子页面模块,\r\n比如首页里有A,B,C 3个链接, 点链接会通过require.ensure动态加载相应的子页面模块,\r\n加入A,B,C三个页面中都引用了antd里的Button组件, 通过webpack打包时候,A,B,C会生成3个js文件,\r\n1.chunk.js, 2.chunk.js, 3.chunk.js,\r\n在这3个打包文件里,都会有重复的antd的Button组件的代码,\r\n请问有什么办法能把重复的代码提取出来么?\r\nCommonsChunkPlugin可以提取entry中指定文件的公共代码,\r\n可是像这种通过require.ensure动态加载的应该如何提取呢?\r\n"}}