module.exports.js = {
  test: /\.js$/,
  loader: 'babel-loader',
  exclude: /node_modules/,
}

// TODO: CSS extraction.
module.exports.css = {
  test: /\.(css)$/,
  use: [
    {
      loader: 'style-loader',
    },
    {
      loader: 'css-loader',
      options: {
        modules: true,
        importLoaders: 1,
        localIdentName: '__[name]-[local]',
      },
    },
    {
      loader: 'postcss-loader',
    },
  ],
}

module.exports.url = {
  test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
  use: [
    {
      loader: 'url-loader',
      options: {
        limit: 10000,
      },
    },
  ],
}
