Resolve purge paths relative to the current working directory (#4655)

* resolve purge paths relative to cwd

* simplify test
This commit is contained in:
Brad Cornes 2021-06-15 21:37:04 +01:00 • committed by GitHub
parent 38a71d8d60
commit 243e8814d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 22 additions and 31 deletions

View file

@ -24,7 +24,7 @@ let previousConfig = null
let processedPlugins = null
let getProcessedPlugins = null
export default function (getConfig, resolvedConfigPath) {
export default function (getConfig) {
return function (css, result) {
const config = getConfig()
const configChanged = hash(previousConfig) !== hash(config)
@ -73,7 +73,7 @@ export default function (getConfig, resolvedConfigPath) {
substituteScreenAtRules({ tailwindConfig: config }),
substituteClassApplyAtRules(config, getProcessedPlugins, configChanged),
applyImportantConfiguration(config),
purgeUnusedStyles(config, configChanged, resolvedConfigPath, registerDependency),
purgeUnusedStyles(config, configChanged, registerDependency),
]).process(css, { from: _.get(css, 'source.input.file') })
}
}