@chatbi-v/config 2.1.6 → 2.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,10 +30,12 @@ export default [
30
30
 
31
31
  ### 2. Prettier 配置
32
32
 
33
- 在项目根目录创建 `.prettierrc.js` 或 `prettier.config.js`:
33
+ 在项目根目录创建 `prettier.config.js` (ESM):
34
34
 
35
35
  ```javascript
36
- module.exports = require('@chatbi-v/config/prettier');
36
+ import prettierConfig from '@chatbi-v/config/prettier';
37
+
38
+ export default prettierConfig;
37
39
  ```
38
40
 
39
41
  或者在 `package.json` 中:
@@ -46,13 +48,13 @@ module.exports = require('@chatbi-v/config/prettier');
46
48
 
47
49
  ### 3. Tailwind CSS 配置
48
50
 
49
- 在项目根目录创建 `tailwind.config.js`:
51
+ 在项目根目录创建 `tailwind.config.js` (ESM):
50
52
 
51
53
  ```javascript
52
- const baseConfig = require('@chatbi-v/config/tailwind');
54
+ import baseConfig from '@chatbi-v/config/tailwind';
53
55
 
54
56
  /** @type {import('tailwindcss').Config} */
55
- module.exports = {
57
+ export default {
56
58
  ...baseConfig,
57
59
  content: [
58
60
  "./index.html",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatbi-v/config",
3
- "version": "2.1.6",
3
+ "version": "2.1.8",
4
4
  "main": "./index.js",
5
5
  "type": "module",
6
6
  "publishConfig": {
package/prettier.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * @author ChatBI Team
5
5
  */
6
6
 
7
- module.exports = {
7
+ export default {
8
8
  semi: true,
9
9
  tabWidth: 2,
10
10
  printWidth: 100,
package/tailwind.js CHANGED
@@ -4,11 +4,13 @@
4
4
  * @author ChatBI Team
5
5
  */
6
6
 
7
- const { green, red } = require('tailwindcss/colors');
8
- const plugin = require('tailwindcss/plugin');
7
+ import colors from 'tailwindcss/colors';
8
+ import plugin from 'tailwindcss/plugin';
9
+
10
+ const { green, red } = colors;
9
11
 
10
12
  /** @type {import('tailwindcss').Config} */
11
- module.exports = {
13
+ export default {
12
14
  // ① 关闭 Preflight,避免与 antd 的 normalize 冲突
13
15
  corePlugins: { preflight: false },
14
16
  // ② 只在 #root 容器内让 utilities 权重+1,解决优先级问题