add base/preflight

master
Brad Cornes 2020-05-10 13:19:17 +01:00
parent c9fea34deb
commit c78faee425
1 changed files with 7 additions and 2 deletions

View File

@ -83,8 +83,12 @@ export default async function getClassNames(
} }
hook.unwatch() hook.unwatch()
const [components, utilities] = await Promise.all( const [base, components, utilities] = await Promise.all(
['components', 'utilities'].map((group) => [
semver.gte(version, '0.99.0') ? 'base' : 'preflight',
'components',
'utilities',
].map((group) =>
postcss([tailwindcss(configPath)]).process(`@tailwind ${group};`, { postcss([tailwindcss(configPath)]).process(`@tailwind ${group};`, {
from: undefined, from: undefined,
}) })
@ -112,6 +116,7 @@ export default async function getClassNames(
config: resolvedConfig, config: resolvedConfig,
separator: typeof userSeperator === 'undefined' ? ':' : userSeperator, separator: typeof userSeperator === 'undefined' ? ':' : userSeperator,
classNames: await extractClassNames([ classNames: await extractClassNames([
{ root: base.root, source: 'base' },
{ root: components.root, source: 'components' }, { root: components.root, source: 'components' },
{ root: utilities.root, source: 'utilities' }, { root: utilities.root, source: 'utilities' },
]), ]),