father icon indicating copy to clipboard operation
father copied to clipboard

自定义的 tsconfig.json 不生效

Open zhaoyao91 opened this issue 6 years ago • 1 comments

我在根目录下放了一个 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
};

zhaoyao91 avatar Dec 20 '19 11:12 zhaoyao91

+1,某些项目不希望做 es5 转译,只想达到类似 tsc 的效果就行(之所以不直接用 tsc,因为 father-build 省心,用到了其他特性

aweiu avatar Nov 20 '20 05:11 aweiu

father 4 已发布,可尝试升级到最新版:https://github.com/umijs/father/blob/master/docs/guide/migrate.md

旧版本不再维护,感谢支持

PeachScript avatar Aug 31 '22 11:08 PeachScript