{"action":"opened","issue":{"url":"https://api.github.com/repos/fex-team/fis3-hook-node_modules/issues/29","repository_url":"https://api.github.com/repos/fex-team/fis3-hook-node_modules","labels_url":"https://api.github.com/repos/fex-team/fis3-hook-node_modules/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/fex-team/fis3-hook-node_modules/issues/29/comments","events_url":"https://api.github.com/repos/fex-team/fis3-hook-node_modules/issues/29/events","html_url":"https://github.com/fex-team/fis3-hook-node_modules/issues/29","id":155067519,"number":29,"title":"当 es6 文件，设置 isMod 时，编译失败","user":{"login":"ystarlongzi","id":2840462,"avatar_url":"https://avatars.githubusercontent.com/u/2840462?v=3","gravatar_id":"","url":"https://api.github.com/users/ystarlongzi","html_url":"https://github.com/ystarlongzi","followers_url":"https://api.github.com/users/ystarlongzi/followers","following_url":"https://api.github.com/users/ystarlongzi/following{/other_user}","gists_url":"https://api.github.com/users/ystarlongzi/gists{/gist_id}","starred_url":"https://api.github.com/users/ystarlongzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ystarlongzi/subscriptions","organizations_url":"https://api.github.com/users/ystarlongzi/orgs","repos_url":"https://api.github.com/users/ystarlongzi/repos","events_url":"https://api.github.com/users/ystarlongzi/events{/privacy}","received_events_url":"https://api.github.com/users/ystarlongzi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-16T16:31:45Z","updated_at":"2016-05-16T16:31:45Z","closed_at":null,"body":"`fis-conf.js` 配置文件精简后如下：\r\n\r\n```\r\nfis.match('*.js', {\r\n\tisMod: true\r\n});\r\nfis.match('*.es6', {\r\n\tisMod: true,\r\n\trExt: '.js'\r\n});\r\n// 使用 node_modules 加载模块\r\n//fis.hook('commonjs');\r\n//fis.unhook('components');\r\nfis.hook('node_modules');\r\n```\r\n\r\n如题，当设置 `fis.hook('node_modules')` 并且 `.es6` 文件配置 `isMod:true` 时，编译提示 `content.replace is not a function`，如果把 `fis.hook('node_modules')` 注释掉，编译就会成功。\r\n\r\n\r\n另外，使用 [fis3-hook-npm](https://github.com/qqiangwu/fis3-hook-npm) 插件时，无上述问题，编译成功。\r\n\r\n\r\n还有，想请教下，fis 下插件怎么调试啊？比如刚才提到的报错信息是 `content.replace is not a function`，大致推断出应该是这里的[第33行代码](https://github.com/fex-team/fis3-hook-node_modules/blob/master/lib%2Fbrowserify.js#L33)，但是不知道 content 的具体内容是什么，或者怎么调试设置断点\r\n\r\n\r\n"}}