Skip to content
Permalink
main
Switch branches/tags
Go to file
Apply defaults after plugins are applied to allow plugins to feature their own defaults.
This allows to make preset plugins.
37 contributors

Users who have contributed to this file

@sokra @TheLarkInn @ooflorent @alexander-akait @EugeneHlushko @mistic @ryandrew14 @mc-zone @ManuelBauer @d3viant0ne @jhnns @tmilloff
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { applyWebpackOptionsDefaults } = require("./config/defaults");
const { getNormalizedWebpackOptions } = require("./config/normalization");
class WebpackOptionsDefaulter {
process(options) {
options = getNormalizedWebpackOptions(options);
applyWebpackOptionsDefaults(options);
return options;
}
}
module.exports = WebpackOptionsDefaulter;