Skip to content

Add legacy type exports to tailwindcss/plugin export #16505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Don’t replace `_` in suggested theme keys ([#16433](https://github.com/tailwindlabs/tailwindcss/pull/16433))
- Ensure `--default-outline-width` can be used to change the `outline-width` value of the `outline` utility
- Ensure drop shadow utilities don't inherit unexpectedly ([#16471](https://github.com/tailwindlabs/tailwindcss/pull/16471))
- Export backwards compatible config and plugin types from `tailwindcss/plugin` ([#16505](https://github.com/tailwindlabs/tailwindcss/pull/16505))

## [4.0.6] - 2025-02-10

Expand Down
13 changes: 12 additions & 1 deletion packages/tailwindcss/src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import type { Config, PluginFn, PluginWithConfig, PluginWithOptions } from './compat/plugin-api'
import type { ThemeConfig } from './compat/config/types'
import type {
Config,
Plugin,
PluginAPI,
PluginFn,
PluginWithConfig,
PluginWithOptions,
} from './compat/plugin-api'

function createPlugin(handler: PluginFn, config?: Partial<Config>): PluginWithConfig {
return {
Expand All @@ -24,3 +32,6 @@ createPlugin.withOptions = function <T>(
}

export default createPlugin

// v3 compatible types previously exported via `tailwindcss/types/config`
export type { Config, PluginAPI, PluginFn as PluginCreator, Plugin as PluginsConfig, ThemeConfig }