报错如下:
antd/lib/input/Input.d.ts:16:6 - error TS1023: An index signature parameter type must be either 'string' or 'number'.
16 [key: `data-${string}`]: string;
解决方法:
找 tsconfig.json
添加下列代码
"skipLibCheck": true,
运行npm run build
编译成功 出现这个请况的原因是ant与ts打包冲突, "skipLibCheck": true,的意思是ts编译不打包,所以可以避免这个冲突。