{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/extract-text-webpack-plugin/issues/30","labels_url":"https://api.github.com/repos/webpack/extract-text-webpack-plugin/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/webpack/extract-text-webpack-plugin/issues/30/comments","events_url":"https://api.github.com/repos/webpack/extract-text-webpack-plugin/issues/30/events","html_url":"https://github.com/webpack/extract-text-webpack-plugin/issues/30","id":45092455,"number":30,"title":"Reloading extracted css with hot module replacement","user":{"login":"nickdima","id":614468,"avatar_url":"https://avatars.githubusercontent.com/u/614468?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdima","html_url":"https://github.com/nickdima","followers_url":"https://api.github.com/users/nickdima/followers","following_url":"https://api.github.com/users/nickdima/following{/other_user}","gists_url":"https://api.github.com/users/nickdima/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdima/subscriptions","organizations_url":"https://api.github.com/users/nickdima/orgs","repos_url":"https://api.github.com/users/nickdima/repos","events_url":"https://api.github.com/users/nickdima/events{/privacy}","received_events_url":"https://api.github.com/users/nickdima/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2014-10-07T10:38:29Z","updated_at":"2015-08-17T20:44:26Z","closed_at":"2014-11-07T20:41:59Z","body":"Is it possible to have hot module replacement for an extracted css file that I load via a css link tag in my html's head tag?\r\nI have HMR working for my javascript but not sure how to make it work for extracted css.\r\nThis is my css related config:\r\n``` coffeescript\r\nentry:\r\n    styles: ['webpack-dev-server/client?http://localhost:3001', 'webpack/hot/dev-server', './app.scss']\r\nloaders: [\r\n  {\r\n    test: /\\.scss$/\r\n    loader: ExtractTextPlugin.extract \"style-loader\", \"css-loader!sass-loader?\" + JSON.stringify\r\n      outputStyle: 'expanded'\r\n      includePaths: [\r\n        path.resolve __dirname, './app'\r\n        path.resolve __dirname, './bower_components'\r\n        require('node-bourbon').includePaths\r\n        path.resolve __dirname, './vendor/css'\r\n      ]\r\n  }\r\nplugins: [new ExtractTextPlugin \"css/#{nameBundle}.css\"]\r\n```"},"comment":{"url":"https://api.github.com/repos/webpack/extract-text-webpack-plugin/issues/comments/131956403","html_url":"https://github.com/webpack/extract-text-webpack-plugin/issues/30#issuecomment-131956403","issue_url":"https://api.github.com/repos/webpack/extract-text-webpack-plugin/issues/30","id":131956403,"user":{"login":"WishCow","id":969284,"avatar_url":"https://avatars.githubusercontent.com/u/969284?v=3","gravatar_id":"","url":"https://api.github.com/users/WishCow","html_url":"https://github.com/WishCow","followers_url":"https://api.github.com/users/WishCow/followers","following_url":"https://api.github.com/users/WishCow/following{/other_user}","gists_url":"https://api.github.com/users/WishCow/gists{/gist_id}","starred_url":"https://api.github.com/users/WishCow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WishCow/subscriptions","organizations_url":"https://api.github.com/users/WishCow/orgs","repos_url":"https://api.github.com/users/WishCow/repos","events_url":"https://api.github.com/users/WishCow/events{/privacy}","received_events_url":"https://api.github.com/users/WishCow/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T20:44:26Z","updated_at":"2015-08-17T20:44:26Z","body":"@sokra that does not work, however messing around a bit with it, it turns out that adding sourceMap to both sass, and css loader work:\r\n\r\n```js\r\n{\r\n  test: /\\.scss$/,\r\n  loaders: [ 'style', 'css?sourceMap', 'sass?sourceMap' ]\r\n}\r\n```\r\n\r\nIt does produce a bit of a weird output in Chrome about which file the rules belong to, but clicking on the line does reveal the correct scss file (with the correct line number).\r\n\r\nI'll open an issue on sass-loader, so that it has the correct information on how to enable source maps, so people don't get mislead here.\r\n\r\nThanks a lot!"}}