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

purgeCSS ignores tailwind classes in nuxt.config.js (bodyAttr, htmlAttrs) #82

Closed
MZanggl opened this issue Apr 10, 2020 · 0 comments · Fixed by #84
Closed

purgeCSS ignores tailwind classes in nuxt.config.js (bodyAttr, htmlAttrs) #82

MZanggl opened this issue Apr 10, 2020 · 0 comments · Fixed by #84
Labels
enhancement New feature or request

Comments

@MZanggl
Copy link

MZanggl commented Apr 10, 2020

(repost from nuxt/nuxt#7197)

Version

v2.12.2

Reproduction link

https://github.com/MZanggl/nuxt-tailwind-config-purge-bug

Steps to reproduce

Running npm run dev you will see the page displaying a blue background. This is because I added

bodyAttrs: {
      class: 'bg-blue-200'
}

in nuxt.config.js.

Running npm run generate and opening the generated files just returns a white background as the class bg-blue-200 got purged.

What is expected ?

classes inside nuxt.config.js get detected by purgeCSS.

What is actually happening?

purgeCSS does not take class names in nuxt.config.js into consideration so it accidentally purges these classes.

@manniL manniL added the enhancement New feature or request label Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants