Nuxt/examples/tailwindcss-purgecss
Adam deffd1f4d3
fix(examples): avoid warning with legacy postcss.config.js (#7098)
Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
2020-03-24 10:00:39 +01:00
..
.github
assets/css
components
layouts
pages
.gitignore
nuxt.config.js fix(examples): avoid warning with legacy postcss.config.js (#7098) 2020-03-24 10:00:39 +01:00
package.json fix(examples): fix deps on codesandbox (#4828) 2019-01-22 11:04:19 +03:30
README.md doc: create/update README.mds for examples (#4980) 2019-02-08 15:48:30 +01:00
tailwind.js chore: update @nuxtjs/eslint-config to v2 and fix lint errors (#6732) 2019-11-26 23:42:39 +01:00

Nuxt Tailwind CSS + Purgecss

Demo of using Nuxt with Tailwind CSS and Purgecss to drastically reduce CSS size.

Demo

https://nuxt-tailwindcss-purgecss.surge.sh/

demo

Before and after stats

The before CSS bundle came out to 299kb, where as after running it through Purgecss, it dropped to 3kb (granted I'm only using around a dozen classes).

tailwind default tailwind purgecss

Performance

And since the CSS remains inline (due to using Purgecss as a postcss plugin) it scores perfect on Google Page Speed Insights! (This is after running nuxt generate and deploying the dist folder)

pagespeed mobile pagespeed desktop

Other

See also this demo