From 089cafb7abaede454dfc094f49461fa2ecdfee83 Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Sun, 28 Sep 2025 12:12:28 +0800 Subject: [PATCH] perf: uninstall classnames, install clsx --- .gitignore | 1 + package.json | 6 +++--- src/BaseInput.tsx | 2 +- src/Input.tsx | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d099b0d..cda3eae 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ lib es yarn.lock package-lock.json +pnpm-lock.yaml coverage/ .doc dist/ diff --git a/package.json b/package.json index dc061a6..c54de48 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,8 @@ "prepare": "husky install" }, "dependencies": { - "classnames": "^2.2.1", - "@rc-component/util": "^1.3.0" + "@rc-component/util": "^1.3.0", + "clsx": "^2.1.1" }, "devDependencies": { "@rc-component/father-plugin": "^2.0.3", @@ -53,8 +53,8 @@ "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.0.1", "@testing-library/user-event": "^14.0.0-beta", - "@types/classnames": "^2.2.9", "@types/jest": "^29.5.14", + "@types/node": "^24.5.2", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.1", "@umijs/fabric": "^4.0.0", diff --git a/src/BaseInput.tsx b/src/BaseInput.tsx index 4724858..c8c6176 100644 --- a/src/BaseInput.tsx +++ b/src/BaseInput.tsx @@ -1,4 +1,4 @@ -import clsx from 'classnames'; +import { clsx } from 'clsx'; import type { ReactElement, ReactNode } from 'react'; import React, { cloneElement, useRef } from 'react'; import type { BaseInputProps } from './interface'; diff --git a/src/Input.tsx b/src/Input.tsx index e986a13..7f73ad0 100644 --- a/src/Input.tsx +++ b/src/Input.tsx @@ -1,4 +1,4 @@ -import clsx from 'classnames'; +import { clsx } from 'clsx'; import useControlledState from '@rc-component/util/lib/hooks/useControlledState'; import omit from '@rc-component/util/lib/omit'; import React, {