Skip to content

Commit dcb34b0

Browse files
committed
fix: ssr error #3983 #3997
1 parent 726f6b4 commit dcb34b0

File tree

9 files changed

+28
-8
lines changed

9 files changed

+28
-8
lines changed

CHANGELOG.en-US.md

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010

1111
---
1212

13+
## 2.1.5
14+
15+
`2021-05-12`
16+
17+
- 🐞 Fix SSR time reporting error [#3983](https://github.com/vueComponent/ant-design-vue/issues/3983)
18+
1319
## 2.1.4
1420

1521
`2021-05-09`

CHANGELOG.zh-CN.md

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010

1111
---
1212

13+
## 2.1.5
14+
15+
`2021-05-12`
16+
17+
- 🐞 修复 SSR 时报错问题 [#3983](https://github.com/vueComponent/ant-design-vue/issues/3983)
18+
1319
## 2.1.4
1420

1521
`2021-05-09`

antd-tools/gulpfile.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,16 @@ function babelify(js, modules) {
118118
);
119119
file.path = file.path.replace(/index\.(js|jsx|ts|tsx)$/, 'css.js');
120120
this.push(file);
121-
next();
122-
} else {
123-
next();
121+
} else if (modules !== false) {
122+
const content = file.contents.toString(encoding);
123+
file.contents = Buffer.from(
124+
content
125+
.replace(/lodash-es/g, 'lodash')
126+
.replace(/@ant-design\/icons-vue/g, '@ant-design/icons-vue/lib/icons'),
127+
);
128+
this.push(file);
124129
}
130+
next();
125131
}),
126132
);
127133
if (modules === false) {

components/_util/component-classes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* https://github.com/component/classes.git
44
*/
55

6-
import { indexOf } from 'lodash-es';
6+
import indexOf from 'lodash-es/indexOf';
77

88
/**
99
* Whitespace regexp.

components/carousel/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const CarouselProps = {
5151
slickGoTo: PropTypes.number,
5252
responsive: PropTypes.array,
5353
dotPosition: PropTypes.oneOf(tuple('top', 'bottom', 'left', 'right')),
54+
verticalSwiping: PropTypes.looseBool.def(false),
5455
};
5556

5657
const Carousel = defineComponent({

components/vc-image/src/Image.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
computed,
88
onMounted,
99
} from 'vue';
10-
import { isNumber } from 'lodash-es';
10+
import isNumber from 'lodash-es/isNumber';
1111

1212
import BaseMixin from '../../_util/BaseMixin';
1313
import cn from '../../_util/classNames';

components/vc-menu/Menu.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
toRaw,
1414
watch,
1515
} from 'vue';
16-
import { isEqual } from 'lodash-es';
16+
import isEqual from 'lodash-es/isEqual';
1717

1818
const Menu = {
1919
name: 'Menu',

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ant-design-vue",
3-
"version": "2.1.4",
3+
"version": "2.1.5",
44
"title": "Ant Design Vue",
55
"description": "An enterprise-class UI design language and Vue-based implementation",
66
"keywords": [
@@ -209,6 +209,7 @@
209209
"async-validator": "^3.3.0",
210210
"dom-align": "^1.10.4",
211211
"dom-scroll-into-view": "^2.0.0",
212+
"lodash": "^4.17.21",
212213
"lodash-es": "^4.17.15",
213214
"moment": "^2.27.0",
214215
"omit.js": "^2.0.0",

0 commit comments

Comments
 (0)