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