1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4  value: true
5});
6exports.withPlugins = void 0;
7function _assert() {
8  const data = _interopRequireDefault(require("assert"));
9  _assert = function () {
10    return data;
11  };
12  return data;
13}
14function _withStaticPlugin() {
15  const data = require("./withStaticPlugin");
16  _withStaticPlugin = function () {
17    return data;
18  };
19  return data;
20}
21function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22/**
23 * Resolves a list of plugins.
24 *
25 * @param config exported config
26 * @param plugins list of config config plugins to apply to the exported config
27 */
28const withPlugins = (config, plugins) => {
29  (0, _assert().default)(Array.isArray(plugins), 'withPlugins expected a valid array of plugins or plugin module paths');
30  return plugins.reduce((prev, plugin) => (0, _withStaticPlugin().withStaticPlugin)(prev, {
31    plugin
32  }), config);
33};
34exports.withPlugins = withPlugins;
35//# sourceMappingURL=withPlugins.js.map