Commit b95214e2 authored by Afzal Sayed's avatar Afzal Sayed Committed by Joe Haddad

feat(examples:tailwind): add postcss-preset-env (#10160)

* feat(examples:tailwind): add postcss-preset-env

* fix: prettier

* Review changes

* Update README.md
Co-authored-by: 's avatarJoe Haddad <timer150@gmail.com>
parent ea0d916b
...@@ -49,10 +49,8 @@ now ...@@ -49,10 +49,8 @@ now
This setup is a basic starting point for using [Tailwind CSS](https://tailwindcss.com) with Next.js. This example also includes the following [PostCSS](https://github.com/postcss/postcss) plugins: This setup is a basic starting point for using [Tailwind CSS](https://tailwindcss.com) with Next.js. This example also includes the following [PostCSS](https://github.com/postcss/postcss) plugins:
- [autoprefixer](https://github.com/postcss/autoprefixer) - Adds vendor prefixes to CSS rules in your stylesheet using values from [Can I Use](https://caniuse.com/) - [postcss-preset-env](https://preset-env.cssdb.org/) - Adds stage 2+ features and autoprefixes
- [purgecss](https://github.com/FullHuman/purgecss) - Removes unused CSS - [purgecss](https://github.com/FullHuman/purgecss) - Removes unused CSS
- [cssnano](https://cssnano.co/) - Minifies CSS
- [postcss-easy-import](https://github.com/TrySound/postcss-easy-import) - Allows importing one stylesheet into another
## Limitations ## Limitations
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
}, },
"devDependencies": { "devDependencies": {
"@fullhuman/postcss-purgecss": "^1.3.0", "@fullhuman/postcss-purgecss": "^1.3.0",
"autoprefixer": "^9.7.4", "postcss-preset-env": "^6.7.0",
"postcss-import": "^12.0.1",
"tailwindcss": "^1.1.4" "tailwindcss": "^1.1.4"
} }
} }
...@@ -13,6 +13,6 @@ module.exports = { ...@@ -13,6 +13,6 @@ module.exports = {
}, },
] ]
: undefined, : undefined,
'autoprefixer', 'postcss-preset-env',
], ],
} }
.btn-blue { .btn-blue {
@apply .bg-blue-500 .text-white .font-bold .py-2 .px-4 .rounded; @apply bg-blue-500 text-white font-bold py-2 px-4 rounded;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment