mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Remove default values from config that have default values even when not present at all
This commit is contained in:
parent
cdb0f07f6e
commit
9d40ef519c
@ -58,6 +58,8 @@ const config = {
|
||||
},
|
||||
}
|
||||
|
||||
delete config.presets
|
||||
|
||||
function assertPurged(result) {
|
||||
expect(result.css).not.toContain('.bg-red-600')
|
||||
expect(result.css).not.toContain('.w-1\\/3')
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
import postcss from 'postcss'
|
||||
import plugin from '../src/lib/substituteVariantsAtRules'
|
||||
import processPlugins from '../src/util/processPlugins'
|
||||
import resolveConfig from '../src/util/resolveConfig'
|
||||
import config from '../stubs/defaultConfig.stub.js'
|
||||
|
||||
function run(input, opts = config) {
|
||||
return postcss([plugin(opts, processPlugins(opts.plugins, opts))]).process(input, {
|
||||
const resolved = resolveConfig([opts])
|
||||
return postcss([plugin(resolved, processPlugins(resolved.plugins, resolved))]).process(input, {
|
||||
from: undefined,
|
||||
})
|
||||
}
|
||||
|
||||
@ -220,6 +220,11 @@ export default function resolveConfig(configs) {
|
||||
corePlugins: resolveCorePlugins(allConfigs.map((c) => c.corePlugins)),
|
||||
plugins: resolvePluginLists(configs.map((c) => get(c, 'plugins', []))),
|
||||
},
|
||||
...allConfigs
|
||||
...allConfigs,
|
||||
{
|
||||
prefix: '',
|
||||
important: false,
|
||||
separator: ':',
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@ -4,9 +4,7 @@ module.exports = {
|
||||
// purgeLayersByDefault: true,
|
||||
},
|
||||
purge: [],
|
||||
prefix: '',
|
||||
important: false,
|
||||
separator: ':',
|
||||
presets: [],
|
||||
theme: {
|
||||
screens: {
|
||||
sm: '640px',
|
||||
@ -818,6 +816,5 @@ module.exports = {
|
||||
transitionDelay: ['responsive'],
|
||||
animation: ['responsive'],
|
||||
},
|
||||
corePlugins: {},
|
||||
plugins: [],
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user