text: const path = require('path')
  const webpack = require('webpack')
  const autoprefixer = require('autoprefixer')
  const ExtractTextPlugin = require('extract-text-webpack-plugin')
  
  const sassLoaders = [
    'css-loader',
    'postcss-loader',
    'sass-loader?indentedSyntax=sass'
  ]
  
  module.exports = {
    entry: './main.js',
    output: {
      filename: 'application.js',
      path: path.join(__dirname, './assets')
    },
    module: {
      loaders: [
        {
          test: /\.jsx?$/,
          loader: 'babel-loader',
          exclude: /node_modules/,
          query: {
            presets: [
              'react',
              'es2015'
            ]
          }
        },
        {
          test: /\.css$/,
          loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
        },
        {
          test: /\.sass$/,
          loader: ExtractTextPlugin.extract('style-loader', sassLoaders.join('!'))
        },
        {
          test: /\.(jpeg|jpg|png|svg|gif)$/,
          loader: 'url-loader'  // ?limit=8192
        }
      ]
    },
    plugins: [
      new ExtractTextPlugin('application.css'),
      new webpack.DefinePlugin({
        'process.env': {
          NODE_ENV: JSON.stringify(process.env.NODE_ENV || 'development')
        }
      })
    ],
    postcss: [
      autoprefixer({
        browsers: ['last 2 versions']
      })
    ],
    resolve: {
      extensions: ['', '.js', '.jsx', '.css', '.sass', '.json']
    }
  }
  