@umijs/plugins 4.2.6 → 4.2.7

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/dist/antd.js CHANGED
@@ -269,6 +269,8 @@ var antd_default = (api) => {
269
269
  const enableV5ThemeAlgorithm = isV5 && (userInputCompact || userInputDark) ? { compact: userInputCompact, dark: userInputDark } : false;
270
270
  const hasConfigProvider = configProvider || enableV5ThemeAlgorithm;
271
271
  const antdConfigSetter = isV5 && hasConfigProvider;
272
+ const isModelPluginEnabled = api.isPluginEnable("model");
273
+ const modelPluginCompat = isModelPluginEnabled && antdConfigSetter;
272
274
  api.writeTmpFile({
273
275
  path: `runtime.tsx`,
274
276
  context: {
@@ -278,6 +280,7 @@ var antd_default = (api) => {
278
280
  // 是否启用了 v5 的 theme algorithm
279
281
  enableV5ThemeAlgorithm,
280
282
  antdConfigSetter,
283
+ modelPluginCompat,
281
284
  lodashPath,
282
285
  /**
283
286
  * 是否重构了全局静态配置。 重构后需要在运行时将全局静态配置传入到 ConfigProvider 中。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugins",
3
- "version": "4.2.6",
3
+ "version": "4.2.7",
4
4
  "description": "@umijs/plugins",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/plugins#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -45,12 +45,12 @@
45
45
  "styled-components": "6.1.1",
46
46
  "tslib": "^2",
47
47
  "warning": "^4.0.3",
48
- "@umijs/bundler-utils": "4.2.6",
48
+ "@umijs/bundler-utils": "4.2.7",
49
49
  "@umijs/valtio": "1.0.4"
50
50
  },
51
51
  "devDependencies": {
52
52
  "antd": "^4.24.1",
53
- "umi": "4.2.6"
53
+ "umi": "4.2.7"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"
@@ -44,6 +44,11 @@ const getAntdConfig = () => {
44
44
  {{/appConfig}}
45
45
  },
46
46
  });
47
+ {{#modelPluginCompat}}
48
+ if (!cacheAntdConfig.theme) {
49
+ cacheAntdConfig.theme = {};
50
+ }
51
+ {{/modelPluginCompat}}
47
52
  }
48
53
  return cacheAntdConfig;
49
54
  }