{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-loader/issues/13","labels_url":"https://api.github.com/repos/vuejs/vue-loader/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-loader/issues/13/comments","events_url":"https://api.github.com/repos/vuejs/vue-loader/issues/13/events","html_url":"https://github.com/vuejs/vue-loader/pull/13","id":93099283,"number":13,"title":"Add CSS Modules capability to vue components","user":{"login":"FWeinb","id":1250430,"avatar_url":"https://avatars.githubusercontent.com/u/1250430?v=3","gravatar_id":"","url":"https://api.github.com/users/FWeinb","html_url":"https://github.com/FWeinb","followers_url":"https://api.github.com/users/FWeinb/followers","following_url":"https://api.github.com/users/FWeinb/following{/other_user}","gists_url":"https://api.github.com/users/FWeinb/gists{/gist_id}","starred_url":"https://api.github.com/users/FWeinb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FWeinb/subscriptions","organizations_url":"https://api.github.com/users/FWeinb/orgs","repos_url":"https://api.github.com/users/FWeinb/repos","events_url":"https://api.github.com/users/FWeinb/events{/privacy}","received_events_url":"https://api.github.com/users/FWeinb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-07-05T10:20:00Z","updated_at":"2015-07-16T11:52:36Z","closed_at":"2015-07-15T00:22:03Z","pull_request":{"url":"https://api.github.com/repos/vuejs/vue-loader/pulls/13","html_url":"https://github.com/vuejs/vue-loader/pull/13","diff_url":"https://github.com/vuejs/vue-loader/pull/13.diff","patch_url":"https://github.com/vuejs/vue-loader/pull/13.patch"},"body":"Like requested in #12 I added support for including css via `css-loader`s [css local scope](https://github.com/webpack/css-loader#local-scope) feature to achieve true CSS Modules like described in [this](https://medium.com/seek-ui-engineering/the-end-of-global-css-90d2a4a06284) blog post.\r\n\r\nTechnically this is done by injecting the result of the required CSS into the `data` object of each component, to gain access to the exported identifiers in the vue instance.  Makeing this work required that you can't have multiple `<style>`-tags when using this feature. I choose to implement it behind the runtime option `injectStyle`. \r\n\r\nI don't now if injecting it into the Vue component is the most elegant way to do it but it is definitely working. It would be great if it where possible to have a object on the vue instance which will, by default, be a on time binding, without explicitly using `{{* }}` every time. "},"comment":{"url":"https://api.github.com/repos/vuejs/vue-loader/issues/comments/121935366","html_url":"https://github.com/vuejs/vue-loader/pull/13#issuecomment-121935366","issue_url":"https://api.github.com/repos/vuejs/vue-loader/issues/13","id":121935366,"user":{"login":"azamat-sharapov","id":3023661,"avatar_url":"https://avatars.githubusercontent.com/u/3023661?v=3","gravatar_id":"","url":"https://api.github.com/users/azamat-sharapov","html_url":"https://github.com/azamat-sharapov","followers_url":"https://api.github.com/users/azamat-sharapov/followers","following_url":"https://api.github.com/users/azamat-sharapov/following{/other_user}","gists_url":"https://api.github.com/users/azamat-sharapov/gists{/gist_id}","starred_url":"https://api.github.com/users/azamat-sharapov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azamat-sharapov/subscriptions","organizations_url":"https://api.github.com/users/azamat-sharapov/orgs","repos_url":"https://api.github.com/users/azamat-sharapov/repos","events_url":"https://api.github.com/users/azamat-sharapov/events{/privacy}","received_events_url":"https://api.github.com/users/azamat-sharapov/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T11:52:36Z","updated_at":"2015-07-16T11:52:36Z","body":"Yeah, you are right. Just thought how many things React adds to DOM behind the scenes.. It's more about maintaining."}}