UNPKG

@kcws/rspack-config

Version:
32 lines 801 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfigBuilder = void 0; const wrapper_1 = require("./wrapper"); /** * @beta */ class ConfigBuilder { wrapper; transformers; constructor(config, transformers) { this.wrapper = new wrapper_1.ConfigWrapper(config); this.transformers = transformers; } set(config) { this.wrapper = this.wrapper.set(config); return this; } add(config) { this.wrapper.merge(config); return this; } use(name, ...params) { this.wrapper = this.transformers[name](this.wrapper, ...params); return this; } build() { return this.wrapper.config; } } exports.ConfigBuilder = ConfigBuilder; //# sourceMappingURL=builder.js.map