{"action":"created","issue":{"url":"https://api.github.com/repos/fex-team/fis3-hook-commonjs/issues/8","labels_url":"https://api.github.com/repos/fex-team/fis3-hook-commonjs/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/fex-team/fis3-hook-commonjs/issues/8/comments","events_url":"https://api.github.com/repos/fex-team/fis3-hook-commonjs/issues/8/events","html_url":"https://github.com/fex-team/fis3-hook-commonjs/issues/8","id":116486051,"number":8,"title":"对于内部实现 amd 规范的库需要添加 skipParse 属性","user":{"login":"GilbertSun","id":1615364,"avatar_url":"https://avatars.githubusercontent.com/u/1615364?v=3","gravatar_id":"","url":"https://api.github.com/users/GilbertSun","html_url":"https://github.com/GilbertSun","followers_url":"https://api.github.com/users/GilbertSun/followers","following_url":"https://api.github.com/users/GilbertSun/following{/other_user}","gists_url":"https://api.github.com/users/GilbertSun/gists{/gist_id}","starred_url":"https://api.github.com/users/GilbertSun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GilbertSun/subscriptions","organizations_url":"https://api.github.com/users/GilbertSun/orgs","repos_url":"https://api.github.com/users/GilbertSun/repos","events_url":"https://api.github.com/users/GilbertSun/events{/privacy}","received_events_url":"https://api.github.com/users/GilbertSun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-12T05:57:39Z","updated_at":"2015-11-12T15:00:48Z","closed_at":null,"body":"本插件对于普通 amd 模块和 cmd 模块表现非常优秀，但是我今天尝试处理 [WebUploader](https://github.com/fex-team/webuploader)的时候出现了问题\r\n\r\nWebUploader 里实现了自己内部的模块加载器，fis 在处理的时候将最后导出的模块的那句\r\n\r\n```javascript\r\ndefine('webuploader',[\r\n    'preset/all',\r\n    'widgets/log'\r\n], function( preset ) {\r\n    return preset;\r\n});\r\nreturn require('webuploader');\r\n```\r\n\r\n会被替换为\r\n```\r\ndefine('webuploader',[\r\n    'preset/all',\r\n    'widgets/log'\r\n], function( preset ) {\r\n    return preset;\r\n});\r\nreturn require('bower_components/fex-webuploader/dist/webuploader');\r\n```\r\n\r\n我现在尝试的解决方案是，添加一个对`skipParse`属性的检测，对于这种不应该由插件分析依赖的文件，就跳过分析的过程\r\n\r\n不知道是不是有其他更好的解决方案"},"comment":{"url":"https://api.github.com/repos/fex-team/fis3-hook-commonjs/issues/comments/156130841","html_url":"https://github.com/fex-team/fis3-hook-commonjs/issues/8#issuecomment-156130841","issue_url":"https://api.github.com/repos/fex-team/fis3-hook-commonjs/issues/8","id":156130841,"user":{"login":"GilbertSun","id":1615364,"avatar_url":"https://avatars.githubusercontent.com/u/1615364?v=3","gravatar_id":"","url":"https://api.github.com/users/GilbertSun","html_url":"https://github.com/GilbertSun","followers_url":"https://api.github.com/users/GilbertSun/followers","following_url":"https://api.github.com/users/GilbertSun/following{/other_user}","gists_url":"https://api.github.com/users/GilbertSun/gists{/gist_id}","starred_url":"https://api.github.com/users/GilbertSun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GilbertSun/subscriptions","organizations_url":"https://api.github.com/users/GilbertSun/orgs","repos_url":"https://api.github.com/users/GilbertSun/repos","events_url":"https://api.github.com/users/GilbertSun/events{/privacy}","received_events_url":"https://api.github.com/users/GilbertSun/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T15:00:48Z","updated_at":"2015-11-12T15:00:48Z","body":"我还没用过 fis 自带的组件系统呢，我先去研究一下，"}}