tailwindcss 安装
# tailwindcss
pnpm i tailwindcss postcss autoprefixer
# 生成 tailwindcss 配置文件
npx tailwindcss init -p
// tailwind.config.js
module.exports = {
...
content: ['./public/**/*.html', './src/**/*.{js,jsx,ts,tsx,vue}'],
}
# 新建/src/styles/index.ts tailwind.css
// index.js
import '@/styles/tailwind.css'
// tailwind.css
@tailwind base;
@tailwind components;
@tailwind utilities;
// main.js
import '@/styles'