{"action":"created","issue":{"url":"https://api.github.com/repos/NervJS/taro/issues/306","repository_url":"https://api.github.com/repos/NervJS/taro","labels_url":"https://api.github.com/repos/NervJS/taro/issues/306/labels{/name}","comments_url":"https://api.github.com/repos/NervJS/taro/issues/306/comments","events_url":"https://api.github.com/repos/NervJS/taro/issues/306/events","html_url":"https://github.com/NervJS/taro/issues/306","id":340174700,"node_id":"MDU6SXNzdWUzNDAxNzQ3MDA=","number":306,"title":"src以外文件夹编译问题","user":{"login":"innocces","id":38065966,"node_id":"MDQ6VXNlcjM4MDY1OTY2","avatar_url":"https://avatars1.githubusercontent.com/u/38065966?v=4","gravatar_id":"","url":"https://api.github.com/users/innocces","html_url":"https://github.com/innocces","followers_url":"https://api.github.com/users/innocces/followers","following_url":"https://api.github.com/users/innocces/following{/other_user}","gists_url":"https://api.github.com/users/innocces/gists{/gist_id}","starred_url":"https://api.github.com/users/innocces/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/innocces/subscriptions","organizations_url":"https://api.github.com/users/innocces/orgs","repos_url":"https://api.github.com/users/innocces/repos","events_url":"https://api.github.com/users/innocces/events{/privacy}","received_events_url":"https://api.github.com/users/innocces/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-11T10:02:28Z","updated_at":"2018-07-23T14:38:03Z","closed_at":null,"author_association":"NONE","body":"**问题描述**\r\n最近在开发一套基于taro的组件库，在src以外建立了component文件夹，但是编译有问题，而且在编译过程中会将我component文件夹的入口文件index.js自动babel掉，这个不知道为什么会有这样的机制。\r\n![tarobug](https://user-images.githubusercontent.com/38065966/42564746-25fdd540-8534-11e8-890f-3c2cb1f5d3ed.png)\r\n这样不知道是和编译机制有关还是如何\r\n**复现步骤**\r\n[复现问题的步骤]\r\n源码如下\r\n```js\r\nimport Taro, { Component } from '@tarojs/taro'\r\nimport { Button, View } from '@tarojs/components'\r\n\r\nimport './button.scss'\r\n\r\nexport default class TaroButton extends Component {\r\n  render () {\r\n    return (\r\n      <View>\r\n        <Button>111</Button>\r\n      </View>\r\n    )\r\n  }\r\n}\r\n```\r\n\r\n**报错信息**\r\n![tarobug](https://user-images.githubusercontent.com/38065966/42564746-25fdd540-8534-11e8-890f-3c2cb1f5d3ed.png)\r\n\r\n**系统信息**\r\n\r\n - 操作系统: [e.g. Windows 7]\r\n - Taro 版本 [e.g. v.0.0.68]\r\n - Node.js 版本 [e.g. v10.3.0]"},"comment":{"url":"https://api.github.com/repos/NervJS/taro/issues/comments/407080837","html_url":"https://github.com/NervJS/taro/issues/306#issuecomment-407080837","issue_url":"https://api.github.com/repos/NervJS/taro/issues/306","id":407080837,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzA4MDgzNw==","user":{"login":"luckyadam","id":1782542,"node_id":"MDQ6VXNlcjE3ODI1NDI=","avatar_url":"https://avatars2.githubusercontent.com/u/1782542?v=4","gravatar_id":"","url":"https://api.github.com/users/luckyadam","html_url":"https://github.com/luckyadam","followers_url":"https://api.github.com/users/luckyadam/followers","following_url":"https://api.github.com/users/luckyadam/following{/other_user}","gists_url":"https://api.github.com/users/luckyadam/gists{/gist_id}","starred_url":"https://api.github.com/users/luckyadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luckyadam/subscriptions","organizations_url":"https://api.github.com/users/luckyadam/orgs","repos_url":"https://api.github.com/users/luckyadam/repos","events_url":"https://api.github.com/users/luckyadam/events{/privacy}","received_events_url":"https://api.github.com/users/luckyadam/received_events","type":"User","site_admin":false},"created_at":"2018-07-23T14:38:03Z","updated_at":"2018-07-23T14:38:03Z","author_association":"CONTRIBUTOR","body":"嗯嗯，目前的机制是引用的文件都会经过 babel 编译~ 这个报错是因为这个组件文件被 import 了但是没有在 jsx 里使用到，升级到最新版本的 Taro 就没有这个问题了"}}
{"actor":{"display_login":"luckyadam"}}