Skip to content

Instantly share code, notes, and snippets.

@i-like-robots
Created May 9, 2016 16:25
Show Gist options
  • Save i-like-robots/f36573e9f6afae1b12213cfecd7cd319 to your computer and use it in GitHub Desktop.
Save i-like-robots/f36573e9f6afae1b12213cfecd7cd319 to your computer and use it in GitHub Desktop.
Minimum Webpack config to output separate stylesheets with sourcemaps
'use strict'
const ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = {
entry: {
'./public/main.css': './src/styles.scss'
},
output: {
filename: '[name]'
},
module: {
loaders: [
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract('style', ['css?sourceMap', 'sass?sourceMap'])
}
]
},
devtool: 'source-map',
plugins: [
new ExtractTextPlugin('[name]')
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment