{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/css-loader/issues/59","labels_url":"https://api.github.com/repos/webpack/css-loader/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/webpack/css-loader/issues/59/comments","events_url":"https://api.github.com/repos/webpack/css-loader/issues/59/events","html_url":"https://github.com/webpack/css-loader/issues/59","id":80470329,"number":59,"title":"Use 'Local scope' in isomorphics code","user":{"login":"snegostup","id":4790093,"avatar_url":"https://avatars.githubusercontent.com/u/4790093?v=3","gravatar_id":"","url":"https://api.github.com/users/snegostup","html_url":"https://github.com/snegostup","followers_url":"https://api.github.com/users/snegostup/followers","following_url":"https://api.github.com/users/snegostup/following{/other_user}","gists_url":"https://api.github.com/users/snegostup/gists{/gist_id}","starred_url":"https://api.github.com/users/snegostup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snegostup/subscriptions","organizations_url":"https://api.github.com/users/snegostup/orgs","repos_url":"https://api.github.com/users/snegostup/repos","events_url":"https://api.github.com/users/snegostup/events{/privacy}","received_events_url":"https://api.github.com/users/snegostup/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-25T09:40:30Z","updated_at":"2015-05-26T20:48:59Z","closed_at":"2015-05-26T06:38:56Z","body":"`var styles = require('./index.css')` raises obvious problem -- you can't use `<div className={styles.myStyle} >` in a component which renders server-side.\r\n\r\nUp until now, when requiring css I used `if (__BROWSER__) require('style.css')` but to write `<div className={( __BROWSER__ ? styles.myStyle : '')}>` each time I think is too much.\r\n\r\n[This article](http://jlongster.com/Backend-Apps-with-Webpack--Part-I) suggests to use webpack to process backend but it suggests to use `IgnorePlugin(/\\.(css|less)$/)` and I believe in case with Local scope won't work.\r\n\r\nSo is there any other option to use Local scope in isomorphic code without any weird hacks?"},"comment":{"url":"https://api.github.com/repos/webpack/css-loader/issues/comments/105660479","html_url":"https://github.com/webpack/css-loader/issues/59#issuecomment-105660479","issue_url":"https://api.github.com/repos/webpack/css-loader/issues/59","id":105660479,"user":{"login":"markdalgleish","id":696693,"avatar_url":"https://avatars.githubusercontent.com/u/696693?v=3","gravatar_id":"","url":"https://api.github.com/users/markdalgleish","html_url":"https://github.com/markdalgleish","followers_url":"https://api.github.com/users/markdalgleish/followers","following_url":"https://api.github.com/users/markdalgleish/following{/other_user}","gists_url":"https://api.github.com/users/markdalgleish/gists{/gist_id}","starred_url":"https://api.github.com/users/markdalgleish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdalgleish/subscriptions","organizations_url":"https://api.github.com/users/markdalgleish/orgs","repos_url":"https://api.github.com/users/markdalgleish/repos","events_url":"https://api.github.com/users/markdalgleish/events{/privacy}","received_events_url":"https://api.github.com/users/markdalgleish/received_events","type":"User","site_admin":false},"created_at":"2015-05-26T20:48:59Z","updated_at":"2015-05-26T20:48:59Z","body":"The link you posted gives instructions on how to achieve this."}}