Skip to content

fix(@astrojs/tailwind): manually load postcss config file#5908

Merged
bluwy merged 7 commits into
mainfrom
moustapha/fix-tw-not-loaded-postcss
Jan 23, 2023
Merged

fix(@astrojs/tailwind): manually load postcss config file#5908
bluwy merged 7 commits into
mainfrom
moustapha/fix-tw-not-loaded-postcss

Conversation

@MoustaphaDev
Copy link
Copy Markdown
Member

@MoustaphaDev MoustaphaDev commented Jan 19, 2023

Changes

Fixes a bug spotted from the Astro discord: https://discord.com/channels/830184174198718474/1065463699508297758

The @astrojs/tailwind integration internally inlines the tailwind and autoprefixer plugins in the vite config, which causes vite to ignore loading postcss configuration files.
This change aims to bring back the default behavior of vite, which is to load postcss config files only when there's no inline postcss configuration in the vite user config.

Testing

Manually tested

Docs

No docs needed, this is a bug fix

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 19, 2023

🦋 Changeset detected

Latest commit: 7863f66

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the pkg: integration Related to any renderer integration (scope) label Jan 19, 2023
@MoustaphaDev MoustaphaDev marked this pull request as draft January 19, 2023 18:15
@MoustaphaDev MoustaphaDev self-assigned this Jan 19, 2023
@MoustaphaDev MoustaphaDev marked this pull request as ready for review January 23, 2023 11:37
@matthewp
Copy link
Copy Markdown
Contributor

Thanks! Can you add a changeset?

Copy link
Copy Markdown
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! with a couple of nits. Thanks for handling this unintentional regression 🙏

Comment thread packages/integrations/tailwind/src/index.ts Outdated
Comment thread pnpm-lock.yaml Outdated
@MoustaphaDev
Copy link
Copy Markdown
Member Author

MoustaphaDev commented Jan 23, 2023

Made the requested changes

@bluwy bluwy merged commit 9e57268 into main Jan 23, 2023
@bluwy bluwy deleted the moustapha/fix-tw-not-loaded-postcss branch January 23, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants