rust-lang-ar / rust-lang-ar.github.io

Argentina's Rust Community Site
https://rust-lang-ar.github.io/
Apache License 2.0
8 stars 3 forks source link

Feature | Tailwind | Setup TailwindCSS & PostCSS to use @apply #11

Closed EstebanBorai closed 3 years ago

EstebanBorai commented 3 years ago

This commit also introduces changes on project scaffold in order to have styles inside of the sources directory.

Using CSS @apply we will be able to use TailwindCSS classes inside of the CSS files.

Refer to this video for more: https://v1.tailwindcss.com/course/composing-utilities-with-apply

This PR also introduces MiniCssExtractPlugin to the webpack configuration.

This help us having a separate file for the CSS on bundle which makes JS a lot smaller due to TailwindCSS classes which are around 187k lines.

Its important to note that TailwindCSS also provides a way to purge what to include or not on the final bundle, but I think we can work on that in the future at the moment.