danderu/learn-webpack

View on GitHub
examples/styles/webpack.autoprefixer.config.js

Summary

Maintainability
A
3 hrs
Test Coverage
var ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = {
  context: __dirname + '/src',
  entry: './',
  module: {
    loaders: [{
      test: /\.css$/,
      include: [
        __dirname + '/src'
      ],
      loader: ExtractTextPlugin.extract('style-loader', 'css-loader!autoprefixer-loader?browsers=last 10 version')
    }]
  },
  output: {
      path: __dirname + '/dist',
      filename: '[name].bundle.[hash].js'
  },
  plugins: [
    new ExtractTextPlugin('[name].css')
  ]
};