diff --git a/src/util/normalizeConfig.js b/src/util/normalizeConfig.js index 1921d84eea60..e973c673fe22 100644 --- a/src/util/normalizeConfig.js +++ b/src/util/normalizeConfig.js @@ -170,7 +170,7 @@ export function normalizeConfig(config) { let extractors = {} - extractors.DEFAULT = (() => { + let defaultExtractor = (() => { if (config.purge?.options?.defaultExtractor) { return config.purge.options.defaultExtractor } @@ -182,6 +182,10 @@ export function normalizeConfig(config) { return undefined })() + if (defaultExtractor !== undefined) { + extractors.DEFAULT = defaultExtractor + } + // Functions if (typeof extract === 'function') { extractors.DEFAULT = extract