Skip to content
Prev Previous commit
Next Next commit
Move plugin registration back
  • Loading branch information
thecrypticace committed Nov 7, 2024
commit 096f518fb89e684a34aaabbbedfc7796e4ae348f
11 changes: 6 additions & 5 deletions packages/tailwindcss/src/compat/apply-compat-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ function upgradeToFullPluginSupport({
userConfig,
)

let pluginApi = buildPluginApi(designSystem, ast, resolvedConfig)

for (let { handler } of resolvedConfig.plugins) {
handler(pluginApi)
}

// Merge the user-configured theme keys into the design system. The compat
// config would otherwise expand into namespaces like `background-color` which
// core utilities already read from.
Expand All @@ -234,11 +240,6 @@ function upgradeToFullPluginSupport({
registerThemeVariantOverrides(resolvedUserConfig, designSystem)
registerScreensConfig(resolvedUserConfig, designSystem)

let pluginApi = buildPluginApi(designSystem, ast, resolvedConfig)
for (let { handler } of resolvedConfig.plugins) {
handler(pluginApi)
}

// If a prefix has already been set in CSS don't override it
if (!designSystem.theme.prefix && resolvedConfig.prefix) {
if (resolvedConfig.prefix.endsWith('-')) {
Expand Down