{"action":"created","issue":{"url":"https://api.github.com/repos/Tencent/wepy/issues/1045","repository_url":"https://api.github.com/repos/Tencent/wepy","labels_url":"https://api.github.com/repos/Tencent/wepy/issues/1045/labels{/name}","comments_url":"https://api.github.com/repos/Tencent/wepy/issues/1045/comments","events_url":"https://api.github.com/repos/Tencent/wepy/issues/1045/events","html_url":"https://github.com/Tencent/wepy/issues/1045","id":302565667,"number":1045,"title":"如何编译 node_modules 中的 es6 模块？","user":{"login":"Samlv9","id":6926770,"avatar_url":"https://avatars1.githubusercontent.com/u/6926770?v=4","gravatar_id":"","url":"https://api.github.com/users/Samlv9","html_url":"https://github.com/Samlv9","followers_url":"https://api.github.com/users/Samlv9/followers","following_url":"https://api.github.com/users/Samlv9/following{/other_user}","gists_url":"https://api.github.com/users/Samlv9/gists{/gist_id}","starred_url":"https://api.github.com/users/Samlv9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samlv9/subscriptions","organizations_url":"https://api.github.com/users/Samlv9/orgs","repos_url":"https://api.github.com/users/Samlv9/repos","events_url":"https://api.github.com/users/Samlv9/events{/privacy}","received_events_url":"https://api.github.com/users/Samlv9/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-06T05:08:06Z","updated_at":"2018-03-28T08:39:20Z","closed_at":"2018-03-07T06:35:31Z","author_association":"NONE","body":"我有一个模块是用 es6 写的并且发布到了 npm 上。\r\n**es6-module**\r\n```\r\nexport default function add( v1, v2 ) {\r\n    return v1 + v2;\r\n}\r\n```\r\n\r\n**业务代码**\r\n```\r\nimport add from \"es6-module\";\r\n\r\nconsole.log(add);\r\n```\r\n\r\n这段代码用 wepy-cli 根本无法编译过去，但是如果是 webpack 或者 babel 的话：\r\n**webpack.config.js**\r\n```\r\nmodules.exports = {\r\n      ...\r\n      \"rules\": [\r\n             { \"test\": /\\.js$/, \"excludes\": /node_modules\\/(?!es6\\-modules)/, \"loader\": \"babel-loader\" }\r\n      ]\r\n\r\n}\r\n```\r\n\r\n有没有类似 webpack excludes 或者 babel excludes 之类的配置？\r\n"},"comment":{"url":"https://api.github.com/repos/Tencent/wepy/issues/comments/376807718","html_url":"https://github.com/Tencent/wepy/issues/1045#issuecomment-376807718","issue_url":"https://api.github.com/repos/Tencent/wepy/issues/1045","id":376807718,"user":{"login":"jimmyrogue","id":6006189,"avatar_url":"https://avatars3.githubusercontent.com/u/6006189?v=4","gravatar_id":"","url":"https://api.github.com/users/jimmyrogue","html_url":"https://github.com/jimmyrogue","followers_url":"https://api.github.com/users/jimmyrogue/followers","following_url":"https://api.github.com/users/jimmyrogue/following{/other_user}","gists_url":"https://api.github.com/users/jimmyrogue/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyrogue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyrogue/subscriptions","organizations_url":"https://api.github.com/users/jimmyrogue/orgs","repos_url":"https://api.github.com/users/jimmyrogue/repos","events_url":"https://api.github.com/users/jimmyrogue/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyrogue/received_events","type":"User","site_admin":false},"created_at":"2018-03-28T08:39:20Z","updated_at":"2018-03-28T08:39:20Z","author_association":"NONE","body":"@Choicelin 之前一直是 @Gcaufy 一个人在维护的，之前还是个人项目，去年才被收到腾讯下面，而且现在大部分时间也是他一个人在升级维护"}}
{"actor":{"display_login":"jimmyrogue"}}