Skip to content

Skip over preprocessor files when looking for v4 configs #1159

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 3 commits into from
Feb 4, 2025

Conversation

thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Jan 31, 2025

Tailwind CSS v4.0 is more like a preprocessor and should not be used with Sass, Less, or Stylus. We don't want to consider these files to be potential CSS configuration files for a v4 project.

@thecrypticace thecrypticace marked this pull request as ready for review January 31, 2025 19:57
@thecrypticace
Copy link
Contributor Author

This technically is based on another PR that's not quite ready yet but I wanted to at least get eyes on these changes. Plan to merge this in next week.

@thecrypticace thecrypticace force-pushed the feat/v4-skip-preprocessor-files branch from a00614f to 4b5a17b Compare February 3, 2025 23:53
Copy link
Member

@RobinMalfait RobinMalfait left a comment

Choose a reason for hiding this comment

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

Makes sense, just a question

function requiresPreprocessor(filepath: string) {
let ext = path.extname(filepath)

return ext === '.scss' || ext === '.sass' || ext === '.less' || ext === '.styl'
Copy link
Member

Choose a reason for hiding this comment

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

Do we also want to include .pcss or is that not an issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My thinking was that .pcss files (some extension for postcss) the files should still be valid CSS. Buuuut… yeah maybe we should include it anyway. I can relax the check later if need be.

Base automatically changed from feat/v4-fallback to main February 4, 2025 14:51
@thecrypticace thecrypticace force-pushed the feat/v4-skip-preprocessor-files branch from 46b20b8 to ee8b7ea Compare February 4, 2025 14:53
@thecrypticace thecrypticace merged commit 3277fa3 into main Feb 4, 2025
@thecrypticace thecrypticace deleted the feat/v4-skip-preprocessor-files branch February 4, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants