Make @tailwindcss/jit default engine for Tailwind CSS (#23192)

This Pull Request makes [`@tailwindcss/jit`](https://github.com/tailwindlabs/tailwindcss-jit) the default engine for Tailwind CSS.

It has the following advantages:
- Lightning-fast build times because the CSS is generated on demand.
- Every variant is enabled out of the box.
- Generate arbitrary styles without writing custom CSS.
- Better performance in browser dev-tools.
This commit is contained in:
Mokshit Jain 2021-03-18 21:27:31 +05:30 committed by GitHub
parent 241a916e03
commit aaa999d696
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,8 @@
This example shows how to use [Tailwind CSS](https://tailwindcss.com/) (v2) with Next.js. It follows the steps outlined in the official [Tailwind docs](https://tailwindcss.com/docs/guides/nextjs).
It uses the new [`@tailwindcss/jit`](https://github.com/tailwindlabs/tailwindcss-jit) engine for Tailwind CSS.
## Deploy your own
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):

View file

@ -13,6 +13,7 @@
"react-dom": "^17.0.1"
},
"devDependencies": {
"@tailwindcss/jit": "0.1.3",
"autoprefixer": "^10.0.4",
"postcss": "^8.1.10",
"tailwindcss": "^2.0.2"

View file

@ -2,7 +2,7 @@
// https://tailwindcss.com/docs/using-with-preprocessors
module.exports = {
plugins: {
tailwindcss: {},
'@tailwindcss/jit': {},
autoprefixer: {},
},
}