@modern-js/plugin-tailwindcss 2.22.0 → 2.22.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @modern-js/plugin-tailwindcss
2
2
 
3
+ ## 2.22.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 5522285: fix(tailwind): should not add tools.babel config when not haveTwinMacro
8
+
9
+ fix(tailwind): 在没有命中 haveTwinMacro 时,不添加 tools.babel 配置
10
+
11
+ - Updated dependencies [e2848a2]
12
+ - Updated dependencies [9b69987]
13
+ - Updated dependencies [d4045ed]
14
+ - @modern-js/runtime@2.22.1
15
+ - @modern-js/utils@2.22.1
16
+
3
17
  ## 2.22.0
4
18
 
5
19
  ### Patch Changes
package/dist/cjs/cli.js CHANGED
@@ -108,22 +108,20 @@ const _default = ({ pluginName } = {
108
108
  ];
109
109
  }
110
110
  },
111
- babel(_, { addPlugins }) {
112
- if (haveTwinMacro) {
113
- initTailwindConfig();
114
- addPlugins([
115
- [
116
- require.resolve("babel-plugin-macros"),
117
- {
118
- twin: {
119
- preset: supportCssInJsLibrary,
120
- config: internalTwConfigPath || tailwindConfig
121
- }
111
+ babel: haveTwinMacro ? (_, { addPlugins }) => {
112
+ initTailwindConfig();
113
+ addPlugins([
114
+ [
115
+ require.resolve("babel-plugin-macros"),
116
+ {
117
+ twin: {
118
+ preset: supportCssInJsLibrary,
119
+ config: internalTwConfigPath || tailwindConfig
122
120
  }
123
- ]
124
- ]);
125
- }
126
- }
121
+ }
122
+ ]
123
+ ]);
124
+ } : void 0
127
125
  }
128
126
  };
129
127
  },
package/dist/esm/cli.js CHANGED
@@ -103,23 +103,21 @@ export default function() {
103
103
  ];
104
104
  }
105
105
  },
106
- babel: function babel(_, param) {
106
+ babel: haveTwinMacro ? function(_, param) {
107
107
  var addPlugins = param.addPlugins;
108
- if (haveTwinMacro) {
109
- initTailwindConfig();
110
- addPlugins([
111
- [
112
- require.resolve("babel-plugin-macros"),
113
- {
114
- twin: {
115
- preset: supportCssInJsLibrary,
116
- config: internalTwConfigPath || tailwindConfig
117
- }
108
+ initTailwindConfig();
109
+ addPlugins([
110
+ [
111
+ require.resolve("babel-plugin-macros"),
112
+ {
113
+ twin: {
114
+ preset: supportCssInJsLibrary,
115
+ config: internalTwConfigPath || tailwindConfig
118
116
  }
119
- ]
120
- ]);
121
- }
122
- }
117
+ }
118
+ ]
119
+ ]);
120
+ } : void 0
123
121
  }
124
122
  };
125
123
  },
@@ -88,22 +88,20 @@ export default ({ pluginName } = {
88
88
  ];
89
89
  }
90
90
  },
91
- babel(_, { addPlugins }) {
92
- if (haveTwinMacro) {
93
- initTailwindConfig();
94
- addPlugins([
95
- [
96
- require.resolve("babel-plugin-macros"),
97
- {
98
- twin: {
99
- preset: supportCssInJsLibrary,
100
- config: internalTwConfigPath || tailwindConfig
101
- }
91
+ babel: haveTwinMacro ? (_, { addPlugins }) => {
92
+ initTailwindConfig();
93
+ addPlugins([
94
+ [
95
+ require.resolve("babel-plugin-macros"),
96
+ {
97
+ twin: {
98
+ preset: supportCssInJsLibrary,
99
+ config: internalTwConfigPath || tailwindConfig
102
100
  }
103
- ]
104
- ]);
105
- }
106
- }
101
+ }
102
+ ]
103
+ ]);
104
+ } : void 0
107
105
  }
108
106
  };
109
107
  },
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.22.0",
18
+ "version": "2.22.1",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -49,7 +49,7 @@
49
49
  "babel-plugin-macros": "3.1.0",
50
50
  "hoist-non-react-statics": "^3.3.2",
51
51
  "@swc/helpers": "0.5.1",
52
- "@modern-js/utils": "2.22.0"
52
+ "@modern-js/utils": "2.22.1"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/jest": "^29",
@@ -59,17 +59,17 @@
59
59
  "jest": "^29",
60
60
  "react": "^18",
61
61
  "postcss": "8.4.21",
62
- "@modern-js/core": "2.22.0",
63
- "@modern-js/module-tools": "2.22.0",
64
- "@modern-js/runtime": "2.22.0",
65
- "@modern-js/types": "2.22.0",
66
- "@scripts/build": "2.22.0",
67
- "@modern-js/app-tools": "2.22.0",
68
- "@scripts/jest-config": "2.22.0"
62
+ "@modern-js/core": "2.22.1",
63
+ "@modern-js/module-tools": "2.22.1",
64
+ "@modern-js/runtime": "2.22.1",
65
+ "@modern-js/types": "2.22.1",
66
+ "@scripts/build": "2.22.1",
67
+ "@modern-js/app-tools": "2.22.1",
68
+ "@scripts/jest-config": "2.22.1"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "tailwindcss": ">= 2.0.0 || >= 3.0.0",
72
- "@modern-js/runtime": "^2.22.0"
72
+ "@modern-js/runtime": "^2.22.1"
73
73
  },
74
74
  "peerDependenciesMeta": {
75
75
  "@modern-js/runtime": {