Fix hasBeenWarned condition. (#175)
This commit is contained in:
parent
2d1768209d
commit
1bc8325679
@ -4,8 +4,6 @@ import defaultInclude from "./default-includes";
|
||||
import moduleTransformations from "./module-transformations";
|
||||
import pluginFeatures from "../data/plugin-features";
|
||||
|
||||
const hasBeenWarned = false;
|
||||
|
||||
const validIncludesAndExcludes = [
|
||||
...Object.keys(pluginFeatures),
|
||||
...Object.keys(moduleTransformations).map((m) => moduleTransformations[m]),
|
||||
@ -13,6 +11,8 @@ const validIncludesAndExcludes = [
|
||||
...defaultInclude
|
||||
];
|
||||
|
||||
let hasBeenWarned = false;
|
||||
|
||||
export const validateIncludesAndExcludes = (opts = [], type) => {
|
||||
invariant(
|
||||
Array.isArray(opts),
|
||||
@ -76,6 +76,7 @@ export default function normalizeOptions(opts) {
|
||||
`Deprecation Warning: The "whitelist" option has been deprecated in favor of "include" to
|
||||
match the newly added "exclude" option (instead of "blacklist").`
|
||||
);
|
||||
hasBeenWarned = true;
|
||||
}
|
||||
|
||||
invariant(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user