Files
bw-mini-app/tailwind.config.js
imeepos 14205a9021 feat: 配置 TailwindCSS 并迁移到 Redux
- 配置 TailwindCSS 支持小程序开发
  - 安装 tailwindcss, postcss, autoprefixer
  - 安装 weapp-tailwindcss 插件支持小程序
  - 配置 tailwind.config.js 和 postcss.config.js
  - 更新 Taro 配置支持 TailwindCSS

- 从 Zustand 迁移到 Redux Toolkit
  - 移除 zustand 依赖
  - 安装 redux, react-redux, redux-thunk, @reduxjs/toolkit
  - 重构状态管理架构:
    - src/constants/ - Action 类型常量
    - src/actions/ - Action creators 和异步 actions
    - src/reducers/ - Reducers
    - src/selectors/ - 状态选择器
    - src/hooks/redux.ts - 类型化 hooks
  - 更新组件使用新的 Redux API
  - 保持数据持久化功能

- 更新应用配置
  - 将 app.ts 重命名为 app.tsx 支持 JSX
  - 添加 Redux Provider 到应用根组件
  - 更新 TODO.md 标记完成状态

- 构建验证通过,所有功能正常
2025-09-03 16:33:06 +08:00

16 lines
712 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/** @type {import('tailwindcss').Config} */
module.exports = {
// 这里给出了一份 taro 通用示例,具体要根据你自己项目的目录结构进行配置
// 比如你使用 vue3 项目,你就需要把 vue 这个格式也包括进来
// 不在 content glob 表达式中包括的文件,在里面编写 tailwindcss class是不会生成对应的 css 工具类的
content: ['./public/index.html', './src/**/*.{html,js,ts,jsx,tsx}'],
theme: {
extend: {},
},
plugins: [],
corePlugins: {
// 小程序不需要 preflight因为这主要是给 h5 的,如果你要同时开发多端,你应该使用 process.env.TARO_ENV 环境变量来控制它
preflight: false,
},
}