compatibility: {
    excludePatterns: RegExp[];
    includePatterns: RegExp[];
    mode: number;
} = ...

Configure the verbosity of compatibility warnings generated throughout the software. The compatibility mode defines the logging level of any displayed warnings. The includePatterns and excludePatterns arrays provide a set of regular expressions which can either only include or specifically exclude certain file paths or warning messages. Exclusion rules take precedence over inclusion rules.

Type declaration

  • excludePatterns: RegExp[]
  • includePatterns: RegExp[]
  • mode: number
const includeRgx = new RegExp("/systems/dnd5e/module/documents/active-effect.mjs");
CONFIG.compatibility.includePatterns.push(includeRgx);
const excludeRgx = new RegExp("/systems/dnd5e/");
CONFIG.compatibility.excludePatterns.push(excludeRgx);
const includeRgx = new RegExp("/systems/dnd5e/module/actor/");
const excludeRgx = new RegExp("/systems/dnd5e/module/actor/sheets/base.js");
CONFIG.compatibility.includePatterns.push(includeRgx);
CONFIG.compatibility.excludePatterns.push(excludeRgx);
const includeRgx = new RegExp("applyActiveEffects");
CONFIG.compatibility.includePatterns.push(includeRgx);