@umijs/plugins 4.0.0-canary.20220425.1 → 4.0.0-canary.20220425.2

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
@@ -80,6 +80,15 @@ exports.default = (api) => {
80
80
  },
81
81
  'antd',
82
82
  ],
83
+ [
84
+ require.resolve('babel-plugin-import'),
85
+ {
86
+ libraryName: 'antd-4',
87
+ libraryDirectory: 'es',
88
+ style: style === 'less' ? true : 'css',
89
+ },
90
+ 'antd-4',
91
+ ],
83
92
  ]
84
93
  : [];
85
94
  });
package/dist/layout.js CHANGED
@@ -48,6 +48,7 @@ exports.default = (api) => {
48
48
  cwd: api.cwd,
49
49
  dep: '@ant-design/pro-layout',
50
50
  }) || (0, path_1.dirname)(require.resolve('@ant-design/pro-layout/package.json'));
51
+ const antdPkgPath = (0, path_1.dirname)(require.resolve('antd/package.json'));
51
52
  api.modifyAppData((memo) => {
52
53
  const version = require(`${pkgPath}/package.json`).version;
53
54
  memo.pluginLayout = {
@@ -59,6 +60,7 @@ exports.default = (api) => {
59
60
  api.modifyConfig((memo) => {
60
61
  // import from @ant-design/pro-layout
61
62
  memo.alias['@ant-design/pro-layout'] = pkgPath;
63
+ memo.alias['antd-4'] = antdPkgPath;
62
64
  return memo;
63
65
  });
64
66
  api.onGenerateFiles(() => {
@@ -245,7 +247,7 @@ export function patchRoutes({ routes }) {
245
247
  });
246
248
  const rightRenderContent = `
247
249
  import React from 'react';
248
- import { Avatar, Dropdown, Menu, Spin } from 'antd';
250
+ import { Avatar, Dropdown, Menu, Spin } from 'antd-4';
249
251
  import { LogoutOutlined } from '@ant-design/icons';
250
252
  {{#Locale}}
251
253
  import { SelectLang } from '@@/plugin-locale';
@@ -487,7 +489,7 @@ export default LogoIcon;
487
489
  content: `
488
490
  import React from 'react';
489
491
  import { history, type IRoute } from 'umi';
490
- import { Result, Button } from 'antd';
492
+ import { Result, Button } from 'antd-4';
491
493
 
492
494
  const Exception: React.FC<{
493
495
  children: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugins",
3
- "version": "4.0.0-canary.20220425.1",
3
+ "version": "4.0.0-canary.20220425.2",
4
4
  "description": "@umijs/plugins",
5
5
  "homepage": "https://github.com/umijs/umi-next/tree/master/packages/plugins#readme",
6
6
  "bugs": "https://github.com/umijs/umi-next/issues",
@@ -25,7 +25,7 @@
25
25
  "@ahooksjs/use-request": "^2.0.0",
26
26
  "@ant-design/icons": "^4.7.0",
27
27
  "@ant-design/pro-layout": "^6.35.1",
28
- "@umijs/bundler-utils": "4.0.0-canary.20220425.1",
28
+ "@umijs/bundler-utils": "4.0.0-canary.20220425.2",
29
29
  "antd": "^4.20.0",
30
30
  "antd-dayjs-webpack-plugin": "^1.0.6",
31
31
  "axios": "^0.26.1",
@@ -45,7 +45,7 @@
45
45
  "warning": "^4.0.3"
46
46
  },
47
47
  "devDependencies": {
48
- "umi": "4.0.0-canary.20220425.1"
48
+ "umi": "4.0.0-canary.20220425.2"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"