"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.configMiniCSSExtractPlugin = configMiniCSSExtractPlugin;

var _miniCssExtractPlugin = _interopRequireDefault(require("mini-css-extract-plugin"));

var _nameTemplates = require("../common/nameTemplates");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function configMiniCSSExtractPlugin(options) {
  const {
    enableRTLSplit
  } = options.css.plugins.rtlSplit;
  const cssLTRFileNameTempalte = enableRTLSplit ? (0, _nameTemplates.nameTemplates)('cssdir', options) : (0, _nameTemplates.nameTemplates)('css', options);
  return new _miniCssExtractPlugin.default({
    filename: cssLTRFileNameTempalte,
    chunkFilename: cssLTRFileNameTempalte
  });
}