WebpackOptionsDefaulter.js 470 B

12345678910111213141516171819
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const { applyWebpackOptionsDefaults } = require("./config/defaults");
  7. const { getNormalizedWebpackOptions } = require("./config/normalization");
  8. class WebpackOptionsDefaulter {
  9. process(options) {
  10. options = getNormalizedWebpackOptions(options);
  11. applyWebpackOptionsDefaults(options);
  12. return options;
  13. }
  14. }
  15. module.exports = WebpackOptionsDefaulter;