mirror of https://github.com/webpack/webpack.git
refactor(removed plugin errors): take object as first parameter
This commit is contained in:
parent
55392f23cc
commit
b6becb40c0
|
|
@ -133,8 +133,8 @@ exportPlugins(exports.debug = {}, {
|
|||
"ProfilingPlugin": () => require("./debug/ProfilingPlugin"),
|
||||
});
|
||||
|
||||
const defineMissingPluginError = (pluginName, errorMessage) => {
|
||||
Reflect.defineProperty(exports.optimize, pluginName, {
|
||||
const defineMissingPluginError = (namespace, pluginName, errorMessage) => {
|
||||
Reflect.defineProperty(namespace, pluginName, {
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
get() {
|
||||
|
|
@ -145,12 +145,14 @@ const defineMissingPluginError = (pluginName, errorMessage) => {
|
|||
|
||||
// TODO remove in webpack 5
|
||||
defineMissingPluginError(
|
||||
exports.optimize,
|
||||
"UglifyJsPlugin",
|
||||
"webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead."
|
||||
);
|
||||
|
||||
// TODO remove in webpack 5
|
||||
defineMissingPluginError(
|
||||
exports.optimize,
|
||||
"CommonsChunkPlugin",
|
||||
"webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead."
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue