"use strict";

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

var _entryConfig = require("./entryConfig");

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");

var _statsConfig = require("./statsConfig");

var _getSourceMapType = require("./getSourceMapType");

var _modeUtils = require("./common/modeUtils");

var _externals = require("./externals");

function webpackConfigCreator(options) {
  return {
    entry: (0, _entryConfig.entryConfig)(options),
    mode: (0, _modeUtils.getWebpackMode)(options),
    output: (0, _outputConfig.outputConfig)(options),
    devtool: (0, _getSourceMapType.devtoolConfig)(options),
    stats: (0, _statsConfig.statsConfig)(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),
    externals: (0, _externals.externals)(options),
    resolve: (0, _resolvers.moduleResolver)(options),
    resolveLoader: (0, _resolvers.loaderResolver)(options)
  };
}