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

Resolve tailwind styles loss in bun environment #531

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

IvanLi-CN
Copy link
Contributor

Change the export syntax in tailwind.config.js from CommonJS to ES modules. This modification fixes the issue of missing Tailwind CSS styles when running the application with bun.

I've made some modifications and tested them successfully on Bun 1.1.29 and Node 18.20.2. While I haven't had the chance to test in other environments, I believe the changes should work well across the board.

In my opinion, these modifications are appropriate, but I'm open to feedback if I've overlooked anything. Please feel free to merge this PR if you find it suitable, or close it if you have any concerns.

For context, I've included the error message I initially encountered below.

bunx --bun astro dev

...

warn - The `content` option in your Tailwind CSS configuration is missing or empty.
warn - Configure your content sources or your generated CSS will be missing styles.
warn - https://tailwindcss.com/docs/content-configuration

Thank you for your consideration!

Change the export syntax in tailwind.config.js from CommonJS to ES modules.
This modification fixes the issue of missing Tailwind CSS styles when running
the application with bun.

Signed-off-by: Ivan Li <ivanli2048@gmail.com>
@prototypa prototypa merged commit 1413a45 into onwidget:main Oct 8, 2024
4 checks passed
@prototypa
Copy link
Contributor

Hi @IvanLi-CN

Thank you very much for this.
If you run into other AstroWind issues related to Bun let us know.

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.

2 participants