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:
parent
37a20c9ad4
commit
8ca77e7237
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue