Skip to content

Commit 739778d

Browse files
committed
fix: ESM imports
1 parent 559c4a6 commit 739778d

File tree

10 files changed

+12
-12
lines changed

10 files changed

+12
-12
lines changed

src/Field.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import toChildrenArray from 'rc-util/lib/Children/toArray';
2-
import warning from 'rc-util/lib/warning';
1+
import toChildrenArray from 'rc-util/es/Children/toArray';
2+
import warning from 'rc-util/es/warning';
33
import * as React from 'react';
44
import type {
55
FieldEntity,

src/FieldContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import warning from 'rc-util/lib/warning';
1+
import warning from 'rc-util/es/warning';
22
import * as React from 'react';
33
import type { InternalFormInstance } from './interface';
44

src/List.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import warning from 'rc-util/lib/warning';
2+
import warning from 'rc-util/es/warning';
33
import type { InternalNamePath, NamePath, StoreValue, ValidatorRule, Meta } from './interface';
44
import FieldContext from './FieldContext';
55
import Field from './Field';

src/useForm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import warning from 'rc-util/lib/warning';
1+
import warning from 'rc-util/es/warning';
22
import * as React from 'react';
33
import { HOOK_MARK } from './FieldContext';
44
import type {

src/useWatch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { FormInstance } from '.';
22
import { FieldContext } from '.';
3-
import warning from 'rc-util/lib/warning';
3+
import warning from 'rc-util/es/warning';
44
import { HOOK_MARK } from './FieldContext';
55
import type {
66
InternalFormInstance,

src/utils/validateUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import RawAsyncValidator from 'async-validator';
22
import * as React from 'react';
3-
import warning from 'rc-util/lib/warning';
3+
import warning from 'rc-util/es/warning';
44
import type {
55
InternalNamePath,
66
ValidateOptions,

src/utils/valueUtil.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import getValue from 'rc-util/lib/utils/get';
2-
import setValue from 'rc-util/lib/utils/set';
1+
import getValue from 'rc-util/es/utils/get';
2+
import setValue from 'rc-util/es/utils/set';
33
import type { InternalNamePath, NamePath, Store, StoreValue, EventArgs } from '../interface';
44
import { toArray } from './typeUtil';
55
import cloneDeep from '../utils/cloneDeep';

tests/index.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { render, act, waitFor, renderHook, fireEvent } from './test-utils';
2-
import { resetWarned } from 'rc-util/lib/warning';
2+
import { resetWarned } from 'rc-util/es/warning';
33
import React from 'react';
44
import type { FormInstance } from '../src';
55
import Form, { Field, useForm } from '../src';

tests/initialValue.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState } from 'react';
2-
import { resetWarned } from 'rc-util/lib/warning';
2+
import { resetWarned } from 'rc-util/es/warning';
33
import { render, act, waitFor, renderHook, fireEvent } from './test-utils';
44
import Form, { Field, useForm, List, FormInstance } from '../src';
55
import { Input } from './common/InfoField';

tests/list.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { render, act, fireEvent, screen, waitFor, RenderResult } from './test-utils';
3-
import { resetWarned } from 'rc-util/lib/warning';
3+
import { resetWarned } from 'rc-util/es/warning';
44
import Form, { Field, List } from '../src';
55
import type { FormProps } from '../src';
66
import type { ListField, ListOperations, ListProps } from '../src/List';

0 commit comments

Comments
 (0)