Skip to content

VPB Tailwind Configuration

VitePress Blog uses Tailwind CSS, version v4.1.

VPB Tailwind is processed using the PostCSS plugin tailwindcss.

For specific code, please refer to vitepress-blogs-theme-template.

Add Tailwind to your PostCSS configuration

There are 2 ways to add Tailwind to your PostCSS configuration.

Option 1: postcss.config.mjs configuration

Add the tailwindcss plugin to your PostCSS configuration, as shown below:

postcss.config.mjs

js
export default {
  plugins: {
    "@tailwindcss/postcss": {},
  }
}

Option 2: package.json configuration

Add the postcss configuration to your package.json, as shown below:

package.json

json
{
  "postcss": {
    "plugins": {
      "@tailwindcss/postcss": {}
    }
  }
}

I just try my best to make thing well, Could you give a star ⭐