create-react-app-typescript polyfill lib es6?

时间:2018-02-19 11:15:21

标签: typescript create-react-app

我注意到在create-react-app-typescript的tsconfig中,他们包含了一个“es6”和“dom”的lib部分。

{
  "compilerOptions": {
    "outDir": "build/dist",
    "module": "esnext",
    "target": "es5",
    "lib": [
      "es6",
      "dom"
    ],
...
}

由于Creact React App的大部分配置都是为我们自动完成的,我认为最好澄清以下内容。

通过在tsconfig中指定lib es6,据我所知,编译器将允许编译代码,但是不会将polyfill注入编译输出。

create-react-app-typescript能否解决这个问题,还是需要自带polyfill?

0 个答案:

没有答案
相关问题