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

[6.12] Console warning: The purge/content options have changed in Tailwind CSS v3.0 #855

Open
ineshbose opened this issue Jun 1, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ineshbose
Copy link
Collaborator

Environment

Happening after 6.12.0

Reproduction

https://stackblitz.com/github/nuxt-modules/tailwindcss/tree/docs-examples/examples/module-authoring

Describe the bug

This is some race condition that is causing content modification from hooks to not be parsed properly when tracked with the proxy in 6.12.0.

image

Additional context

No response

Logs

No response

@ineshbose ineshbose added the bug Something isn't working label Jun 1, 2024
@ineshbose
Copy link
Collaborator Author

Possible workaround:

Provide a plugin to tailwindcss.config.plugin like so:

+ import typographyPlugin from '@tailwindcss/typography'

export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: ['@nuxtjs/tailwindcss'],
  tailwindcss: {
+    config: { plugins: [typographyPlugin] }
  }
})

This should have the module revert to inline PostCSS configuration, so the content configuration should evaluate OK.

@ineshbose ineshbose changed the title Console warning: The purge/content options have changed in Tailwind CSS v3.0 [6.12] Console warning: The purge/content options have changed in Tailwind CSS v3.0 Jun 15, 2024
@kingyue737
Copy link

I tried this workaround but it seemed that the style became worse:

Expected
After adding plugin

Nuxt official sites now have incorrect styles which may due to this bug:

screenshots

@ineshbose
Copy link
Collaborator Author

Planned fix: use klona in the merger to copy object, and also resolve all content configurations to object with paths resolved /cc @benjamincanac

Aiming to implement in 6.12.2-nightly in about a week (6.12.1 this week)

@ineshbose
Copy link
Collaborator Author

Implemented potential fix on nightly if you'd like to confirm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants