diff --git a/.fatherrc.js b/.fatherrc.js index 7414da0..96268ae 100644 --- a/.fatherrc.js +++ b/.fatherrc.js @@ -1,10 +1,5 @@ import { defineConfig } from 'father'; export default defineConfig({ - platform: 'browser', - cjs: { output: 'lib' }, - esm: { - output: 'es', - alias: { 'rc-util/lib': 'rc-util/es' }, - }, + plugins: ['@rc-component/father-plugin'], }); diff --git a/package.json b/package.json index 73d7cf8..a6b625d 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ }, "devDependencies": { "@ant-design/icons": "^5.0.1", + "@rc-component/father-plugin": "^1.0.2", "@testing-library/jest-dom": "^6.4.0", "@testing-library/react": "^15.0.6", "@types/classnames": "^2.2.10", diff --git a/src/Image.tsx b/src/Image.tsx index 2f5c3c1..39dc185 100644 --- a/src/Image.tsx +++ b/src/Image.tsx @@ -262,6 +262,8 @@ const ImageInternal: CompoundedComponent = props => { ImageInternal.PreviewGroup = PreviewGroup; -ImageInternal.displayName = 'Image'; +if (process.env.NODE_ENV !== 'production') { + ImageInternal.displayName = 'Image'; +} export default ImageInternal;