56 lines
1.2 KiB
JavaScript
56 lines
1.2 KiB
JavaScript
/** @type {import('tailwindcss').Config} */
|
||
const { heroui } = require("@heroui/react");
|
||
|
||
module.exports = {
|
||
content: [
|
||
// React 组件(排除 node_modules)
|
||
"./src/**/*.{js,jsx,ts,tsx}",
|
||
"./public/index.html",
|
||
|
||
// Hero UI 组件(只扫描必要的路径)
|
||
"./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}",
|
||
"./node_modules/@heroui/react/dist/**/*.{js,ts,jsx,tsx}",
|
||
],
|
||
// 添加 JIT 模式优化
|
||
mode: 'jit',
|
||
theme: {
|
||
extend: {
|
||
// Brainwave 自定义颜色
|
||
colors: {
|
||
n: {
|
||
1: "#FFFFFF",
|
||
2: "#CAC6DD",
|
||
3: "#ADA8C3",
|
||
4: "#757185",
|
||
5: "#3F3A52",
|
||
6: "#252134",
|
||
7: "#15131D",
|
||
8: "#0E0C15",
|
||
},
|
||
color: {
|
||
1: "#AC6AFF",
|
||
2: "#FFC876",
|
||
3: "#FF776F",
|
||
4: "#7ADB78",
|
||
5: "#858DFF",
|
||
6: "#FF98E2",
|
||
},
|
||
stroke: {
|
||
1: "#26242C",
|
||
},
|
||
},
|
||
},
|
||
},
|
||
darkMode: "class", // 支持深色模式(class 或 media)
|
||
plugins: [heroui()],
|
||
|
||
// 性能优化
|
||
safelist: [
|
||
// Hero UI 动态类名(避免被 purge)
|
||
'bg-gradient-to-br',
|
||
'from-blue-500',
|
||
'to-purple-500',
|
||
'backdrop-blur-xl',
|
||
],
|
||
}
|