codemod-v4
codemod-v4 copied to clipboard
codemod cli for antd v4 upgrade
无法引用 createFromIconfontCN from @ant-design/icons
config.js const plugins = [ ['umi-plugin-antd-icon-config', {}], [ 'umi-plugin-react', package.json "dependencies": { "@ant-design/icons": "^4.0.0-alpha.19", "@ant-design/pro-layout": "^5.0.0", "@ant-design/pro-table": "^2.0.0", "@antv/data-set": "^0.11.1", "antd": "^4.0.0-rc.1", "classnames": "^2.2.6", "dva": "^2.6.0-beta.16", "lodash": "^4.17.11", "moment": "^2.24.0",...
## 运行 `antd4-codemod src` 报错 
https://github.com/facebook/jscodeshift/blob/5a6a868433d7e27104d02b1a90917adc0b47589a/src/ignoreFiles.js#L54
``` /Users/tanghui/.npm/_npx/32509/lib/node_modules/@ant-design/codemod-v4/node_modules/core-js/modules/es6.object.set-prototype-of.js:6 $export($export.S, 'Object', { ^ TypeError: $export is not a function at Object. (/Users/tanghui/.npm/_npx/32509/lib/node_modules/@ant-design/codemod-v4/node_modules/core-js/modules/es6.object.set-prototype-of.js:3:1) ```
``` ----------- antd4 dependencies alert ----------- It's recommended to install or upgrade these dependencies to ensure working well with antd4 > package.json file: /Users/afc163/Projects/kitchen-home/package.json * Update antd^4.0.0 in dependencies *...
在 umi 3 项目中升级 antd 4 时,如下报错。 umi 3 会生成一个 `src/.umi` 目录,这个目录在 `.gitignore` 里被忽略。 ``` // .gitignore pids logs node_modules npm-debug.log coverage/ run dist public .DS_Store .nyc_output .basement config.local.js .umi...
I needed to switch from Typescript to Flow. For anyone else using flow, I was able to modify the `babylon.config.json` to change `"typescript"` to `"flow"` and then the tool ran...
add `--migrateform` to auto migrate old form
[BABEL] Note: The code generator has deoptimised the styling of /Users/vagusx/.npm/_npx/90962/lib/node_modules/@ant-design/codemod-v4/node_modules/lodash/lodash.js as it exceeds the max of 500KB.