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:
parent
241a916e03
commit
aaa999d696
3 changed files with 4 additions and 1 deletions
|
@ -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).
|
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 your own
|
||||||
|
|
||||||
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):
|
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
"react-dom": "^17.0.1"
|
"react-dom": "^17.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@tailwindcss/jit": "0.1.3",
|
||||||
"autoprefixer": "^10.0.4",
|
"autoprefixer": "^10.0.4",
|
||||||
"postcss": "^8.1.10",
|
"postcss": "^8.1.10",
|
||||||
"tailwindcss": "^2.0.2"
|
"tailwindcss": "^2.0.2"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// https://tailwindcss.com/docs/using-with-preprocessors
|
// https://tailwindcss.com/docs/using-with-preprocessors
|
||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: {
|
||||||
tailwindcss: {},
|
'@tailwindcss/jit': {},
|
||||||
autoprefixer: {},
|
autoprefixer: {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue