{"action":"created","issue":{"url":"https://api.github.com/repos/dlrandy/note-issues/issues/78","repository_url":"https://api.github.com/repos/dlrandy/note-issues","labels_url":"https://api.github.com/repos/dlrandy/note-issues/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/dlrandy/note-issues/issues/78/comments","events_url":"https://api.github.com/repos/dlrandy/note-issues/issues/78/events","html_url":"https://github.com/dlrandy/note-issues/issues/78","id":326527836,"node_id":"MDU6SXNzdWUzMjY1Mjc4MzY=","number":78,"title":"webpack","user":{"login":"dlrandy","id":7017814,"node_id":"MDQ6VXNlcjcwMTc4MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7017814?v=4","gravatar_id":"","url":"https://api.github.com/users/dlrandy","html_url":"https://github.com/dlrandy","followers_url":"https://api.github.com/users/dlrandy/followers","following_url":"https://api.github.com/users/dlrandy/following{/other_user}","gists_url":"https://api.github.com/users/dlrandy/gists{/gist_id}","starred_url":"https://api.github.com/users/dlrandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlrandy/subscriptions","organizations_url":"https://api.github.com/users/dlrandy/orgs","repos_url":"https://api.github.com/users/dlrandy/repos","events_url":"https://api.github.com/users/dlrandy/events{/privacy}","received_events_url":"https://api.github.com/users/dlrandy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-25T13:37:59Z","updated_at":"2018-12-17T06:02:46Z","closed_at":null,"author_association":"OWNER","body":"treeshaking 就是不被引用的函数在最终打包的时候去掉 ，开发环境下是 导出的接口是一个注释，但是 函数仍然存在；production的时候 ，没有被引用的函数会被移除。\r\n\r\ncode-spliting 需要使用import() require.ensure()来完成，System.import也可以，但是过时了，还有动态加载相对的是站点的root，所以需要设置webpack的publicPath。\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dlrandy/note-issues/issues/comments/447731823","html_url":"https://github.com/dlrandy/note-issues/issues/78#issuecomment-447731823","issue_url":"https://api.github.com/repos/dlrandy/note-issues/issues/78","id":447731823,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzczMTgyMw==","user":{"login":"dlrandy","id":7017814,"node_id":"MDQ6VXNlcjcwMTc4MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7017814?v=4","gravatar_id":"","url":"https://api.github.com/users/dlrandy","html_url":"https://github.com/dlrandy","followers_url":"https://api.github.com/users/dlrandy/followers","following_url":"https://api.github.com/users/dlrandy/following{/other_user}","gists_url":"https://api.github.com/users/dlrandy/gists{/gist_id}","starred_url":"https://api.github.com/users/dlrandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlrandy/subscriptions","organizations_url":"https://api.github.com/users/dlrandy/orgs","repos_url":"https://api.github.com/users/dlrandy/repos","events_url":"https://api.github.com/users/dlrandy/events{/privacy}","received_events_url":"https://api.github.com/users/dlrandy/received_events","type":"User","site_admin":false},"created_at":"2018-12-17T06:02:45Z","updated_at":"2018-12-17T06:02:45Z","author_association":"OWNER","body":"scope hoisting\r\nhttps://medium.com/webpack/brief-introduction-to-scope-hoisting-in-webpack-8435084c171f\r\nProduction编译成数组, development的时候是对象，但是现在webpack是给封装成了对象。查找了一些资料，发现Object的查找比array快 http://jsben.ch/Y9jDP\r\n\r\nhttps://webpack.js.org/plugins/module-concatenation-plugin/#src/components/Sidebar/Sidebar.jsx\r\n\r\n"}}
{"actor":{"display_login":"dlrandy"}}