update pay function
This commit is contained in:
@@ -1,18 +1,34 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
const { heroui } = require("@heroui/react");
|
||||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
content: [
|
||||
// React 组件(排除 node_modules)
|
||||
"./src/**/*.{js,jsx,ts,tsx}",
|
||||
"./public/index.html",
|
||||
content: {
|
||||
relative: true,
|
||||
files: [
|
||||
// 只扫描项目源码(不包含 node_modules)
|
||||
"./src/**/*.{js,jsx,ts,tsx}",
|
||||
"./public/index.html",
|
||||
|
||||
// Hero UI 必需的文件(精确路径)
|
||||
"./node_modules/@heroui/theme/dist/**/*.{js,mjs}",
|
||||
"./node_modules/@heroui/react/dist/**/*.{js,mjs}",
|
||||
],
|
||||
// 明确排除 node_modules 的其他部分
|
||||
transform: {
|
||||
// 排除 node_modules 中非 heroui 的文件
|
||||
DEFAULT: (content, { path: filePath }) => {
|
||||
// 如果是 node_modules 中的文件,但不是 @heroui,则跳过
|
||||
if (filePath.includes('node_modules') && !filePath.includes('@heroui')) {
|
||||
return '';
|
||||
}
|
||||
return content;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
darkMode: "class", // 支持深色模式
|
||||
|
||||
// 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 自定义颜色
|
||||
@@ -41,15 +57,18 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
},
|
||||
darkMode: "class", // 支持深色模式(class 或 media)
|
||||
|
||||
plugins: [heroui()],
|
||||
|
||||
// 性能优化
|
||||
safelist: [
|
||||
// Hero UI 动态类名(避免被 purge)
|
||||
// Hero UI 动态类名
|
||||
'bg-gradient-to-br',
|
||||
'from-blue-500',
|
||||
'to-purple-500',
|
||||
'backdrop-blur-xl',
|
||||
],
|
||||
|
||||
// 优化缓存
|
||||
cacheLocation: path.resolve(__dirname, 'node_modules/.cache/tailwindcss'),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user