"use strict";

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

var _outputConfig = require("./outputConfig");

var _jsLoaders = require("./jsLoaders");

var _cssLoaders = require("./cssLoaders");

var _assetLoaders = require("./loaderConfigs/assetLoaders");

var _plugins = require("./plugins");

var _resolvers = require("./resolvers");

var _optimizationConfig = require("./optimizationConfig");

var _configHtmlTemplateLoader = require("./loaderConfigs/configHtmlTemplateLoader");

var _configWebWorkerLoader = require("./loaderConfigs/configWebWorkerLoader");

// import { devServerConfig } from './devServerConfig';
function webpackConfigCreator(options) {
  return {
    mode: 'development',
    output: (0, _outputConfig.outputConfig)(options),
    devtool: 'cheap-source-map',
    // stats: 'errors-only',
    stats: {
      children: false,
      colors: true,
      errorDetails: true // excludeAssets: /i18n/,
      // excludeAssets: /./,
      // warningsFilter: /\[mini-css-extract-plugin\]/

    },
    // devServer: devServerConfig(options),
    optimization: (0, _optimizationConfig.optimizationConfig)(options),
    module: {
      rules: [...(0, _jsLoaders.jsLoaders)(options), ...(0, _cssLoaders.cssLoaders)(options), (0, _configWebWorkerLoader.configWebWorkerLoader)(options), (0, _configHtmlTemplateLoader.configHtmlTemplateLoader)(options), ...(0, _assetLoaders.assetLoaders)(options)]
    },
    plugins: (0, _plugins.plugins)(options),
    resolve: (0, _resolvers.moduleResolver)(options),
    resolveLoader: (0, _resolvers.loaderResolver)(options)
  };
}