Neaten extract.DEFAULT resolution (#5778)
This commit is contained in:
parent
92df04d0c3
commit
84a6c5d096
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue