Skip to content

Commit 443d90e

Browse files
authored
chore: add @rc-component/father-plugin (#341)
* chore: add @rc-component/father-plugin * remove displayName when production
1 parent 9bc5241 commit 443d90e

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.fatherrc.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import { defineConfig } from 'father';
22

33
export default defineConfig({
4-
platform: 'browser',
5-
cjs: { output: 'lib' },
6-
esm: {
7-
output: 'es',
8-
alias: { 'rc-util/lib': 'rc-util/es' },
9-
},
4+
plugins: ['@rc-component/father-plugin'],
105
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
},
4848
"devDependencies": {
4949
"@ant-design/icons": "^5.0.1",
50+
"@rc-component/father-plugin": "^1.0.2",
5051
"@testing-library/jest-dom": "^6.4.0",
5152
"@testing-library/react": "^15.0.6",
5253
"@types/classnames": "^2.2.10",

src/Image.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ const ImageInternal: CompoundedComponent<ImageProps> = props => {
262262

263263
ImageInternal.PreviewGroup = PreviewGroup;
264264

265-
ImageInternal.displayName = 'Image';
265+
if (process.env.NODE_ENV !== 'production') {
266+
ImageInternal.displayName = 'Image';
267+
}
266268

267269
export default ImageInternal;

0 commit comments

Comments
 (0)