{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-loader/issues/4","labels_url":"https://api.github.com/repos/vuejs/vue-loader/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-loader/issues/4/comments","events_url":"https://api.github.com/repos/vuejs/vue-loader/issues/4/events","html_url":"https://github.com/vuejs/vue-loader/issues/4","id":66122469,"number":4,"title":"请问为啥.vue文件里必须是vueOptions对象，而不能是Vue.extend({})的class？","user":{"login":"sy890622","id":2638521,"avatar_url":"https://avatars.githubusercontent.com/u/2638521?v=3","gravatar_id":"","url":"https://api.github.com/users/sy890622","html_url":"https://github.com/sy890622","followers_url":"https://api.github.com/users/sy890622/followers","following_url":"https://api.github.com/users/sy890622/following{/other_user}","gists_url":"https://api.github.com/users/sy890622/gists{/gist_id}","starred_url":"https://api.github.com/users/sy890622/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sy890622/subscriptions","organizations_url":"https://api.github.com/users/sy890622/orgs","repos_url":"https://api.github.com/users/sy890622/repos","events_url":"https://api.github.com/users/sy890622/events{/privacy}","received_events_url":"https://api.github.com/users/sy890622/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-03T10:24:14Z","updated_at":"2015-04-03T15:52:11Z","closed_at":null,"body":"Hi 哥们，\r\n我这里把vue和webpack组合，cmd的模块加载机制。\r\n我看loader里定义的.vue里面是vueOptions对象，但我们的模块都写成了 module.exports = Vue.extend({}); 这样的类，我可能还会拦截里面的created事件什么的，请问哪种是推荐的做法？\r\n因为vue loader现在的机制我没法定义viewmodel class的模块了"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-loader/issues/comments/89335644","html_url":"https://github.com/vuejs/vue-loader/issues/4#issuecomment-89335644","issue_url":"https://api.github.com/repos/vuejs/vue-loader/issues/4","id":89335644,"user":{"login":"yyx990803","id":499550,"avatar_url":"https://avatars.githubusercontent.com/u/499550?v=3","gravatar_id":"","url":"https://api.github.com/users/yyx990803","html_url":"https://github.com/yyx990803","followers_url":"https://api.github.com/users/yyx990803/followers","following_url":"https://api.github.com/users/yyx990803/following{/other_user}","gists_url":"https://api.github.com/users/yyx990803/gists{/gist_id}","starred_url":"https://api.github.com/users/yyx990803/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyx990803/subscriptions","organizations_url":"https://api.github.com/users/yyx990803/orgs","repos_url":"https://api.github.com/users/yyx990803/repos","events_url":"https://api.github.com/users/yyx990803/events{/privacy}","received_events_url":"https://api.github.com/users/yyx990803/received_events","type":"User","site_admin":false},"created_at":"2015-04-03T15:52:11Z","updated_at":"2015-04-03T15:52:11Z","body":"不一定得是对象，直接 export class 也可以的。export 对象的好处是不用每个文件都 `require('vue')`，写单元测试也比较简单。"}}