From b7830c697e834aeaa858802cae3a9af6cb07962a Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 9 Aug 2024 11:53:05 -0400 Subject: [PATCH] Support Tailwind CSS `v4.0.0-alpha.19` (#310) * Handle async design system in v4 alpha 19 * Update changelog --- CHANGELOG.md | 1 + src/config.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a79df24..b2c66675 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add support for `prettier-plugin-multiline-arrays` ([#299](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/pull/299)) - Add resolution cache for known plugins ([#301](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/pull/301)) +- Support Tailwind CSS `v4.0.0-alpha.19` ([#310](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/pull/310)) ## [0.6.5] - 2024-06-17 diff --git a/src/config.ts b/src/config.ts index 4161226f..ee3294d9 100644 --- a/src/config.ts +++ b/src/config.ts @@ -171,7 +171,11 @@ async function loadV4( // Load the design system and set up a compatible context object that is // usable by the rest of the plugin - let design = tw.__unstable__loadDesignSystem(result.css) + let design = await tw.__unstable__loadDesignSystem(result.css, { + loadPlugin() { + return () => {} + }, + }) return { context: {