This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Description
Repo: https://github.com/christofferberg/jit/tree/main/
I've tried to setup Tailwind JIT in a Nextjs project and everything seems to work fine, until I require @tailwindcss/forms in the plugins array of the tailwind.config.js file.
Error:
Unknown error from PostCSS plugin. Your current PostCSS version is 8.1.7, but postcss-preset-env uses 7.0.35. Perhaps this is the source of the error below.
error - ./styles/globals.css ((webpack)/css-loader/cjs.js??ref--5-oneOf-6-1!(webpack)/postcss-loader/cjs.js??ref--5-oneOf-6-2!./styles/globals.css)
RangeError: Maximum call stack size exceeded
at Function.keys (<anonymous>)
tailwind.config.js:
module.exports = {
purge: [],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [
require("@tailwindcss/forms"), // Loading this creates error: Unknown error from PostCSS plugin. Your current PostCSS version is 8.1.7, but postcss-preset-env uses 7.0.35. Perhaps this is the source of the error below.
require("@tailwindcss/typography"),
require("tailwindcss-debug-screens"),
],
};
postcss.config.js
module.exports = {
plugins: [
"@tailwindcss/jit",
"postcss-nesting",
"postcss-flexbugs-fixes",
[
"postcss-preset-env",
{
autoprefixer: {
flexbox: "no-2009",
},
stage: 3,
features: {
"custom-properties": false,
},
},
],
],
};