Skip to content

Commit 0a6ef05

Browse files
committed
Fix issue with omitted extension for antd icons
With `"type": "module"` in package.json most bundlers (e.g. webpack 5 and vite) expect an extension for referencing files directly inside `node_modules`. I guess the safest way is to just import them directly from the package.
1 parent ea3b763 commit 0a6ef05

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

packages/antd/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Ant Design theme, fields and widgets for `react-jsonschema-form`.
6161
### Prerequisites
6262

6363
- `antd >= 5`
64-
- `@ant-design/icons >= 5`
64+
- `@ant-design/icons >= 6`
6565
- `dayjs >= 1.8.0`
6666
- `@rjsf/core >= 6`
6767
- `@rjsf/utils >= 6`

packages/antd/src/templates/ErrorList/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Alert, List, Space } from 'antd';
2-
import ExclamationCircleOutlined from '@ant-design/icons/ExclamationCircleOutlined';
2+
import { ExclamationCircleOutlined } from '@ant-design/icons';
33
import { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';
44

55
/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`

packages/antd/src/templates/IconButton/index.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { Button, ButtonProps } from 'antd';
2-
import ArrowDownOutlined from '@ant-design/icons/ArrowDownOutlined';
3-
import ArrowUpOutlined from '@ant-design/icons/ArrowUpOutlined';
4-
import CopyOutlined from '@ant-design/icons/CopyOutlined';
5-
import DeleteOutlined from '@ant-design/icons/DeleteOutlined';
6-
import PlusCircleOutlined from '@ant-design/icons/PlusCircleOutlined';
2+
import {
3+
ArrowDownOutlined,
4+
ArrowUpOutlined,
5+
CopyOutlined,
6+
DeleteOutlined,
7+
PlusCircleOutlined,
8+
} from '@ant-design/icons';
79
import {
810
getUiOptions,
911
FormContextType,

0 commit comments

Comments
 (0)