restore user-defined mode config after compilation

master
Brad Cornes 2021-04-07 23:17:40 +01:00
parent 93405340aa
commit 72ad324467
1 changed files with 7 additions and 0 deletions

View File

@ -70,9 +70,11 @@ export default async function getClassNames(
: ['options', 'separator']
let userSeperator
let userPurge
let userMode
let hook = Hook(fs.realpathSync(configPath), (exports) => {
userSeperator = dlv(exports, sepLocation)
userPurge = exports.purge
userMode = exports.mode
dset(
exports,
sepLocation,
@ -145,6 +147,11 @@ export default async function getClassNames(
} else {
delete config.purge
}
if (typeof userMode !== 'undefined') {
config.mode = userMode
} else {
delete config.mode
}
const resolvedConfig = resolveConfig({
base: configDir,