vue-cli-plugin-tailwind is a specialized plugin designed to simplify the integration of Tailwind CSS into projects managed by Vue CLI. Its current stable release is v3.0.0, which mandates compatibility with Vue CLI v5.0 or newer and provides support for Tailwind CSS v3.0. The plugin automates the setup of Tailwind CSS, including necessary PostCSS configurations, and offers an interactive prompt to generate a `tailwind.config.js` file with minimal, full, or no predefined content. This significantly reduces manual setup effort and potential configuration errors, allowing developers to quickly adopt Tailwind's utility-first approach within their Vue.js applications. The project's release cadence generally aligns with major updates to both Vue CLI and Tailwind CSS, ensuring ongoing compatibility and feature support.
npm install vue-cli-plugin-tailwindVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install `vue-cli-plugin-tailwind` into a new or existing Vue CLI project, including prerequisite `vue-cli` versions and interactive configuration options for `tailwind.config.js`.
Before adding or upgrading the plugin, ensure your global Vue CLI installation is v5.0+ by running `npm install -g @vue/cli@next`.
Before running `vue add tailwind@next` for an upgrade, execute `npm uninstall tailwindcss @tailwindcss/postcss7-compat postcss autoprefixer` in your project root to clear legacy packages.
Carefully select the configuration option: 'minimal' for a basic setup, 'full' for the entire default config (useful for exploration), or 'none' if you are managing your own Tailwind configuration (e.g., in a monorepo) or already have one.
First, update Vue CLI globally to v5.0+: `npm install -g @vue/cli@next`. Then, in your project, run `vue add tailwind@next` to install the plugin.
Follow the explicit upgrade steps for v3: `npm uninstall tailwindcss @tailwindcss/postcss7-compat postcss autoprefixer`, then ensure Vue CLI v5.0+ is installed globally, and finally run `vue add tailwind@next`.