@umijs/plugins 4.0.77 → 4.0.79

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
@@ -202,7 +202,7 @@ var antd_default = (api) => {
202
202
  }) || (0, import_path.dirname)(require.resolve("@ant-design/cssinjs/package.json"));
203
203
  if (cssinjs) {
204
204
  styleProviderConfig = {
205
- cssinjs
205
+ cssinjs: (0, import_plugin_utils.winPath)(cssinjs)
206
206
  };
207
207
  if (ieTarget) {
208
208
  styleProviderConfig.hashPriority = "high";
@@ -264,7 +264,7 @@ export type IRuntimeConfig = {
264
264
  });
265
265
  });
266
266
  api.addRuntimePlugin(() => {
267
- if (api.config.antd.configProvider || appComponentAvailable && api.config.antd.appConfig) {
267
+ if (api.config.antd.styleProvider || api.config.antd.configProvider || appComponentAvailable && api.config.antd.appConfig) {
268
268
  return [(0, import_withTmpPath.withTmpPath)({ api, path: "runtime.tsx" })];
269
269
  }
270
270
  return [];
@@ -282,5 +282,3 @@ export type IRuntimeConfig = {
282
282
  return imports;
283
283
  });
284
284
  };
285
- // Annotate the CommonJS export names for ESM import in node:
286
- 0 && (module.exports = {});
package/dist/layout.js CHANGED
@@ -116,11 +116,14 @@ var layout_default = (api) => {
116
116
  }
117
117
  return memo;
118
118
  });
119
- const isFlattedDepsDir = [import_plugin_utils.NpmClientEnum.npm, import_plugin_utils.NpmClientEnum.yarn].includes(
120
- api.appData.npmClient
121
- );
122
119
  api.onGenerateFiles(() => {
123
- const PKG_TYPE_REFERENCE = `/// <reference types="${isFlattedDepsDir ? ANT_PRO_COMPONENT : resolvedPkgPath}" />`;
120
+ const isFlattedDepsDir = [import_plugin_utils.NpmClientEnum.npm, import_plugin_utils.NpmClientEnum.yarn].includes(
121
+ api.appData.npmClient
122
+ );
123
+ const PKG_TYPE_REFERENCE = `
124
+ /// <reference types="${isFlattedDepsDir ? ANT_PRO_COMPONENT : resolvedPkgPath}" />
125
+ ${isFlattedDepsDir ? '/// <reference types="antd" />' : ""}
126
+ `.trimStart();
124
127
  const hasInitialStatePlugin = api.config.initialState;
125
128
  api.writeTmpFile({
126
129
  path: "Layout.tsx",
@@ -726,5 +729,3 @@ export default Exception;
726
729
  return [(0, import_withTmpPath.withTmpPath)({ api, path: "runtime.tsx" })];
727
730
  });
728
731
  };
729
- // Annotate the CommonJS export names for ESM import in node:
730
- 0 && (module.exports = {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugins",
3
- "version": "4.0.77",
3
+ "version": "4.0.79",
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",
@@ -44,12 +44,12 @@
44
44
  "styled-components": "6.0.0-rc.0",
45
45
  "tslib": "^2",
46
46
  "warning": "^4.0.3",
47
- "@umijs/bundler-utils": "4.0.77",
47
+ "@umijs/bundler-utils": "4.0.79",
48
48
  "@umijs/valtio": "1.0.3"
49
49
  },
50
50
  "devDependencies": {
51
51
  "antd": "^4.24.1",
52
- "umi": "4.0.77"
52
+ "umi": "4.0.79"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"
@@ -103,7 +103,7 @@ export function rootContainer(rawContainer) {
103
103
  container = (
104
104
  <StyleProvider
105
105
  {{#styleProvider.hashPriority}}
106
- hashPriority="{{{styleProviderConfig.hashPriority}}}"
106
+ hashPriority="{{{styleProvider.hashPriority}}}"
107
107
  {{/styleProvider.hashPriority}}
108
108
  {{#styleProvider.legacyTransformer}}
109
109
  transformers={[legacyLogicalPropertiesTransformer]}