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 :)
This commit is contained in:
Stiaan Jacobs 2021-11-20 11:17:58 +02:00 committed by GitHub
parent 37a20c9ad4
commit 8ca77e7237
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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