Skip to content

Astro not working with latest TailwindCSS #14030

@qtzar

Description

@qtzar

Astro Info

Astro                    v5.10.2
Node                     v24.3.0
System                   macOS (arm64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/markdoc
                         astro-icon
                         pagefind
                         relative-links
                         astro-expressive-code
                         @astrojs/mdx

If this issue only occurs in one browser, which browser is a problem?

N/A

Describe the Bug

When running Astro with the latest 4.1.11 version of TailwindCSS and @tailwindcss/vite dependancies the following error is reported during build. Reverting back to versions 4.1.10 resolves the issue. I suspect it is due to tailwind adding support for Vite 7.

astro.config.mjs:108:13 - error ts(2322): Type 'Plugin$1[]' is not assignable to type 'PluginOption'.
Type 'Plugin$1[]' is not assignable to type 'PluginOption[]'.

108 plugins: [tailwindcss()],
~~~~~~~~~~~~~

Note, I cannot get StackBlitz to install any dependancies due to an internal npm error. Trying to resolve.

What's the expected result?

Expect build to process normally and not exit with an error

Link to Minimal Reproducible Example

https://stackblitz.com/~/github.com/qtzar/github-pbzfummy

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P2: has workaroundAn edge case that only affects very specific usage, but has a trivial workaround (priority)requires breaking changeFixing this bug or adding this feature would require breaking changes. For PRs, use "semver: major"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions