Skip to main content

Install dependencies

This page only covers package installation. Framework-specific registration comes in the next chapter; see the weapp-tw CLI guide for the complete CLI reference.

Install the current version

These docs target tailwindcss@4 and the latest weapp-tailwindcss. The current guide only maintains Tailwind CSS 4 integration instructions.

npm install -D tailwindcss weapp-tailwindcss

Use the standalone CLI

If the project needs to generate Web or mini-program CSS directly from a CSS file, install the standalone @weapp-tailwindcss/cli package:

npm install -D @weapp-tailwindcss/cli weapp-tailwindcss tailwindcss

The CLI provides the weapp-tw command. It processes CSS only and does not scan or rewrite WXML, JS, TS, JSX, or TSX. Full mini-program projects should continue to use the corresponding Vite, Webpack, Rspack, or Gulp integration.

Next, choose a framework integration or read the weapp-tw CLI guide.