father
father copied to clipboard
自定义的 tsconfig.json 不生效
我在根目录下放了一个 tsconfig.json 文件,内容如下:
{
"compilerOptions": {
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"declaration": true,
"declarationMap": true,
"declarationDir": "./typings",
"sourceMap": true,
"module": "esnext",
"target": "esnext",
"moduleResolution": "node",
"jsx": "preserve"
},
"include": ["./src"]
}
但是编译结果完全无视了这个配置……
附上 .fatherrc.js
export default {
esm: "babel",
cjs: "babel",
runtimeHelpers: true
};
+1,某些项目不希望做 es5 转译,只想达到类似 tsc 的效果就行(之所以不直接用 tsc,因为 father-build 省心,用到了其他特性
father 4 已发布,可尝试升级到最新版:https://github.com/umijs/father/blob/master/docs/guide/migrate.md
旧版本不再维护,感谢支持