赞
踩
npm install -D tailwindcss postcss autoprefixer
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
}
}
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["index.html", "./src/**/*.{html,js,ts,jsx,tsx,vue}"],
theme: {
extend: {},
},
plugins: [],
}
@tailwind base;
@tailwind components;
@tailwind utilities;
import './assets/tailwind.css'
如果遇到提示报错 “[plugin:vite:css] Failed to load PostCss config” 将第2步的 postcss.config.js 后缀名改为 postcss.config.cjs
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。