ignore purge option (#131)

master
Brad Cornes 2020-06-20 19:05:36 +01:00
parent aaa9bd9f2b
commit 647b556a6c
1 changed files with 8 additions and 0 deletions

View File

@ -72,9 +72,12 @@ export default async function getClassNames(
? ['separator'] ? ['separator']
: ['options', 'separator'] : ['options', 'separator']
let userSeperator let userSeperator
let userPurge
let hook = Hook(configPath, (exports) => { let hook = Hook(configPath, (exports) => {
userSeperator = dlv(exports, sepLocation) userSeperator = dlv(exports, sepLocation)
userPurge = exports.purge
dset(exports, sepLocation, '__TAILWIND_SEPARATOR__') dset(exports, sepLocation, '__TAILWIND_SEPARATOR__')
exports.purge = {}
return exports return exports
}) })
@ -106,6 +109,11 @@ export default async function getClassNames(
} else { } else {
delete config[sepLocation] delete config[sepLocation]
} }
if (typeof userPurge !== 'undefined') {
config.purge = userPurge
} else {
delete config.purge
}
const resolvedConfig = resolveConfig({ cwd: configDir, config }) const resolvedConfig = resolveConfig({ cwd: configDir, config })
const browserslist = browserslistModule const browserslist = browserslistModule