Skip to content
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

Allow support for non-jsx React files in Tailwind config #159

Closed
wants to merge 1 commit into from

Conversation

morris14
Copy link

Not all developers will use .jsx as the file extension for their React components. I was editing a React component recently with a .js prefix and realised my tailwind classes weren't getting generated correctly. This should help support that.

@morris14
Copy link
Author

morris14 commented Jun 20, 2022

Support for this indicated here: https://tailwindcss.com/docs/configuration#content

@jessarcher
Copy link
Member

Hi @morris14,

With the upcoming switch to Vite in #158, new projects will need to use a .jsx extension for files containing JSX as this is required by Vite.

Do you know of any common scenarios where a .js file would contain Tailwind classes and not be using JSX?

@morris14
Copy link
Author

@jessarcher that makes sense, thanks for clarifying!

I guess devs who are used to using .js will just need to get used to using .jsx 😄

Thanks 👍

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