Skip to content

Commit c78faee

Browse files
author
Brad Cornes
committed
add base/preflight
1 parent c9fea34 commit c78faee

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/class-names/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,12 @@ export default async function getClassNames(
8383
}
8484
hook.unwatch()
8585

86-
const [components, utilities] = await Promise.all(
87-
['components', 'utilities'].map((group) =>
86+
const [base, components, utilities] = await Promise.all(
87+
[
88+
semver.gte(version, '0.99.0') ? 'base' : 'preflight',
89+
'components',
90+
'utilities',
91+
].map((group) =>
8892
postcss([tailwindcss(configPath)]).process(`@tailwind ${group};`, {
8993
from: undefined,
9094
})
@@ -112,6 +116,7 @@ export default async function getClassNames(
112116
config: resolvedConfig,
113117
separator: typeof userSeperator === 'undefined' ? ':' : userSeperator,
114118
classNames: await extractClassNames([
119+
{ root: base.root, source: 'base' },
115120
{ root: components.root, source: 'components' },
116121
{ root: utilities.root, source: 'utilities' },
117122
]),

0 commit comments

Comments
 (0)