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

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
@@ -49,8 +49,7 @@ exports.default = (api) => {
49
49
  api.modifyConfig((memo) => {
50
50
  checkPkgPath();
51
51
  // antd import
52
- // alias 会导致 antd 不能多实例,故删除
53
- // memo.alias.antd = pkgPath;
52
+ memo.alias.antd = pkgPath;
54
53
  // moment > dayjs
55
54
  if (memo.antd.dayjs) {
56
55
  memo.alias.moment = (0, path_1.dirname)(require.resolve('dayjs/package.json'));
@@ -80,15 +79,6 @@ exports.default = (api) => {
80
79
  },
81
80
  'antd',
82
81
  ],
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
- ],
92
82
  ]
93
83
  : [];
94
84
  });
package/dist/layout.js CHANGED
@@ -48,7 +48,6 @@ 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'));
52
51
  api.modifyAppData((memo) => {
53
52
  const version = require(`${pkgPath}/package.json`).version;
54
53
  memo.pluginLayout = {
@@ -60,7 +59,6 @@ exports.default = (api) => {
60
59
  api.modifyConfig((memo) => {
61
60
  // import from @ant-design/pro-layout
62
61
  memo.alias['@ant-design/pro-layout'] = pkgPath;
63
- memo.alias['antd-4'] = antdPkgPath;
64
62
  return memo;
65
63
  });
66
64
  api.onGenerateFiles(() => {
@@ -247,7 +245,7 @@ export function patchRoutes({ routes }) {
247
245
  });
248
246
  const rightRenderContent = `
249
247
  import React from 'react';
250
- import { Avatar, Dropdown, Menu, Spin } from 'antd-4';
248
+ import { Avatar, Dropdown, Menu, Spin } from 'antd';
251
249
  import { LogoutOutlined } from '@ant-design/icons';
252
250
  {{#Locale}}
253
251
  import { SelectLang } from '@@/plugin-locale';
@@ -489,7 +487,7 @@ export default LogoIcon;
489
487
  content: `
490
488
  import React from 'react';
491
489
  import { history, type IRoute } from 'umi';
492
- import { Result, Button } from 'antd-4';
490
+ import { Result, Button } from 'antd';
493
491
 
494
492
  const Exception: React.FC<{
495
493
  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.2",
3
+ "version": "4.0.0-canary.20220425.3",
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,8 +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.2",
29
- "antd": "^4.20.0",
28
+ "@umijs/bundler-utils": "4.0.0-canary.20220425.3",
30
29
  "antd-dayjs-webpack-plugin": "^1.0.6",
31
30
  "axios": "^0.26.1",
32
31
  "babel-plugin-import": "^1.13.3",
@@ -45,7 +44,7 @@
45
44
  "warning": "^4.0.3"
46
45
  },
47
46
  "devDependencies": {
48
- "umi": "4.0.0-canary.20220425.2"
47
+ "umi": "4.0.0-canary.20220425.3"
49
48
  },
50
49
  "publishConfig": {
51
50
  "access": "public"