Open afc163 opened 4 years ago
这边考虑读取当前项目中的 .gitignore 跟 package.json 读取策略保持一致,并与 codemod.ignore
https://github.com/ant-design/codemod-v4/blob/master/bin/codemod.ignore 合并后传给 jscodeshift
根据 jscodeshift 代码来看,多传一个 --ignore-config 即可,将嗅探到的 .gitignore 路径传入
@afc163 这个不光是 gitinogre 的问题,那个 history.ts 能发出来看看没?看着是有语法解析问题
if ((<any>window).routerBase) {
options.basename = (<any>window).routerBase;
}
let history = createBrowserHistory(options);
export const createHistory = (hotReload = false) => {
if (!hotReload) {
history = createBrowserHistory(options);
}
return history;
};
<any>
泛型导致被识别成了 jsx 导致报错
在 umi 3 项目中升级 antd 4 时,如下报错。
umi 3 会生成一个
src/.umi
目录,这个目录在.gitignore
里被忽略。但是还是会去跑迁移脚本,导致报错。