mirror of https://github.com/webpack/webpack.git
pr comments
This commit is contained in:
parent
3e75d36d18
commit
c11f89c976
|
@ -23,7 +23,6 @@ const RuleSetCompiler = require("./rules/RuleSetCompiler");
|
|||
const UseEffectRulePlugin = require("./rules/UseEffectRulePlugin");
|
||||
const LazySet = require("./util/LazySet");
|
||||
const { cachedCleverMerge } = require("./util/cleverMerge");
|
||||
const { createDeprecation } = require("./util/deprecation");
|
||||
const { join } = require("./util/fs");
|
||||
|
||||
/** @typedef {import("./Generator")} Generator */
|
||||
|
@ -578,15 +577,6 @@ class NormalModuleFactory extends ModuleFactory {
|
|||
resolveContext,
|
||||
callback
|
||||
) {
|
||||
for (const item of array) {
|
||||
if (typeof item.options === "string") {
|
||||
createDeprecation(
|
||||
`Using string as a loader options is deprecated (${item.loader}${item.options})`,
|
||||
"LOADER_OPTIONS_STRING"
|
||||
).call(null);
|
||||
}
|
||||
}
|
||||
|
||||
if (array.length === 0) return callback(null, array);
|
||||
asyncLib.map(
|
||||
array,
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { createDeprecation } = require("../util/deprecation");
|
||||
|
||||
/** @typedef {import("./RuleSetCompiler")} RuleSetCompiler */
|
||||
/** @typedef {import("./RuleSetCompiler").Effect} Effect */
|
||||
|
||||
|
@ -77,6 +79,12 @@ class UseEffectRulePlugin {
|
|||
if (!ident) ident = defaultIdent;
|
||||
references.set(ident, options);
|
||||
}
|
||||
if (typeof options === "string") {
|
||||
createDeprecation(
|
||||
`Using string as a loader options is deprecated (${loader}: ${options})`,
|
||||
"LOADER_OPTIONS_STRING"
|
||||
).call(null);
|
||||
}
|
||||
return {
|
||||
type: enforce ? `use-${enforce}` : "use",
|
||||
value: {
|
||||
|
|
Loading…
Reference in New Issue