From 8ca77e7237ffe2e97f6f64bed21b128ffad5c50f Mon Sep 17 00:00:00 2001 From: Stiaan Jacobs Date: Sat, 20 Nov 2021 11:17:58 +0200 Subject: [PATCH] Add migration guide for Tailwind CSS (#1940) Added some proposed changes to help others migrate their Astro projects built with Tailwind CSS, over to the new version. This is what I had to do to get it to work :) --- docs/src/pages/migration/0.21.0.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/src/pages/migration/0.21.0.md b/docs/src/pages/migration/0.21.0.md index 04dd7f7b69..9bf83e3a11 100644 --- a/docs/src/pages/migration/0.21.0.md +++ b/docs/src/pages/migration/0.21.0.md @@ -208,6 +208,20 @@ Autoprefixer is no longer run by default. To enable: }, }; ``` +### Tailwind CSS + +Ensure you have PostCSS installed. This was optional in previous releases, but is required now: + +1. Intall the latest version of postcss (`npm i -D postcss`) +2. Create a `postcss.config.cjs` file at the root of your project with: + ```js + module.exports = { + plugins: { + tailwindcss: {}, + }, + }; + ``` +For more information, read the [Tailwind CSS documentation](https://tailwindcss.com/docs/installation#add-tailwind-as-a-post-css-plugin) [snowpack]: https://www.snowpack.dev [vite]: https://vitejs.dev