// Autogenerated by Mojo::Alien::webpack 1.01
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('css-minimizer-webpack-plugin');

module.exports = function(config, {isDev}) {
  if (!isDev) config.optimization.minimizer.push(new OptimizeCSSAssetsPlugin({}));
  config.plugins.push(new MiniCssExtractPlugin({filename: isDev ? '[name].development.css' : '[name].[contenthash].css'}));
  config.module.rules.push({
    test: /\.s(a|c)ss$/,
    use: [
      MiniCssExtractPlugin.loader,
      {loader: 'css-loader', options: {sourceMap: true, url: false}},
      {loader: 'sass-loader', options: {sourceMap: true}},
    ],
  });
};
