{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/1022","labels_url":"https://api.github.com/repos/webpack/webpack/issues/1022/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/1022/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/1022/events","html_url":"https://github.com/webpack/webpack/issues/1022","id":71812012,"number":1022,"title":"Output CSS to different directory with ExtractTextPlugin","user":{"login":"simonsmith","id":360703,"avatar_url":"https://avatars.githubusercontent.com/u/360703?v=3","gravatar_id":"","url":"https://api.github.com/users/simonsmith","html_url":"https://github.com/simonsmith","followers_url":"https://api.github.com/users/simonsmith/followers","following_url":"https://api.github.com/users/simonsmith/following{/other_user}","gists_url":"https://api.github.com/users/simonsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/simonsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonsmith/subscriptions","organizations_url":"https://api.github.com/users/simonsmith/orgs","repos_url":"https://api.github.com/users/simonsmith/repos","events_url":"https://api.github.com/users/simonsmith/events{/privacy}","received_events_url":"https://api.github.com/users/simonsmith/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-29T08:20:46Z","updated_at":"2015-09-11T19:04:47Z","closed_at":"2015-05-04T21:39:42Z","body":"I'm using the ExtractTextPlugin to build a separate CSS file. It works great but I'd really like to output the CSS into a different directory than the JS:\r\n\r\n``` js\r\nmodule.exports = {\r\n  entry: {\r\n    module: \"./source/javascripts/app.js\",\r\n  },\r\n  output: {\r\n    path: './source/built/',\r\n    filename: 'app.js'\r\n  },\r\n  module: {\r\n    loaders:[\r\n      {\r\n        test: /\\.js$/, exclude: /node_modules/, loader: 'babel-loader'\r\n      },\r\n      {\r\n        test: /\\.css$/,\r\n        loader: ExtractTextPlugin.extract('style-loader', 'css-loader!postcss-loader')\r\n      }\r\n    ]\r\n  },\r\n  plugins: [\r\n    new ExtractTextPlugin('app.css')\r\n  ]\r\n};\r\n```\r\nCurrently both files go into `./source/built`, is there a way to change this?"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/139632526","html_url":"https://github.com/webpack/webpack/issues/1022#issuecomment-139632526","issue_url":"https://api.github.com/repos/webpack/webpack/issues/1022","id":139632526,"user":{"login":"iDVB","id":189506,"avatar_url":"https://avatars.githubusercontent.com/u/189506?v=3","gravatar_id":"","url":"https://api.github.com/users/iDVB","html_url":"https://github.com/iDVB","followers_url":"https://api.github.com/users/iDVB/followers","following_url":"https://api.github.com/users/iDVB/following{/other_user}","gists_url":"https://api.github.com/users/iDVB/gists{/gist_id}","starred_url":"https://api.github.com/users/iDVB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iDVB/subscriptions","organizations_url":"https://api.github.com/users/iDVB/orgs","repos_url":"https://api.github.com/users/iDVB/repos","events_url":"https://api.github.com/users/iDVB/events{/privacy}","received_events_url":"https://api.github.com/users/iDVB/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T19:04:47Z","updated_at":"2015-09-11T19:04:47Z","body":"This worked for me..\r\n\r\n```javascript\r\nwebpack: { // grunt-webpack\r\n  options: {\r\n    module: {\r\n      loaders: [\r\n        { test: /\\.jsx?$/, exclude: /(node_modules|bower_components)/, loader: 'babel' }, // REACTJS FILES\r\n        { test: /\\.json?$/, exclude: /(node_modules|bower_components)/, loader: 'json' }, // JSON FILES\r\n        { test: /\\.scss$/, loader: ExtractTextPlugin.extract('css!sass?includePaths[]=' + bourbon, { publicPath: '../'}) }, // SASS & CSS FILES\r\n        { test: /\\.(jpe?g|png|gif|svg)$/i, exclude: /(node_modules|bower_components)/, loader: 'url?limit=1000&name=images/[hash].[ext]' } // IMAGES\r\n      ]\r\n    } \r\n  },\r\n  dev: {\r\n    entry: './<%= project.path.voter.assets %>/app/app.js',\r\n    output: {\r\n      path: './<%= project.path.voter.dist %>/',\r\n      filename: 'js/voter.bundle.js'\r\n    },\r\n    plugins: [\r\n      new ExtractTextPlugin('css/voter.bundle.css', {\r\n        allChunks: true\r\n      })\r\n    ]\r\n  }\r\n}\r\n```"}}