Copied from CSS/tailwindcss
yarn add -D tailwindcss autoprefixer cssnano
npx tailwind init tailwind.config.js --full
@tailwind base;/* Preflight will be injected here */
/*Put all classes here*/
@tailwind components;
@tailwind utilities;
yarn add gatsby-plugin-postcss
require("./static/css/index.css");
const tailwindConfig = require("./tailwind.config.js");
{
resolve: `gatsby-plugin-postcss`,
options: {
postCssPlugins: [
require(`tailwindcss`)(tailwindConfig),
require(`autoprefixer`),
...(process.env.NODE_ENV === `production`
? [require(`cssnano`)]
: []),
],
},
},