From c78faee425c3d9f9da64fa978bffac6f8c660bba Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Sun, 10 May 2020 13:19:17 +0100 Subject: [PATCH] add base/preflight --- src/class-names/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/class-names/index.js b/src/class-names/index.js index 8aef0b0..62d478d 100644 --- a/src/class-names/index.js +++ b/src/class-names/index.js @@ -83,8 +83,12 @@ export default async function getClassNames( } hook.unwatch() - const [components, utilities] = await Promise.all( - ['components', 'utilities'].map((group) => + const [base, components, utilities] = await Promise.all( + [ + semver.gte(version, '0.99.0') ? 'base' : 'preflight', + 'components', + 'utilities', + ].map((group) => postcss([tailwindcss(configPath)]).process(`@tailwind ${group};`, { from: undefined, }) @@ -112,6 +116,7 @@ export default async function getClassNames( config: resolvedConfig, separator: typeof userSeperator === 'undefined' ? ':' : userSeperator, classNames: await extractClassNames([ + { root: base.root, source: 'base' }, { root: components.root, source: 'components' }, { root: utilities.root, source: 'utilities' }, ]),