Is there a way to use --esModuleInterop in tsconfig as opposed to it being a flag?

前端 未结 2 857
执念已碎
执念已碎 2020-12-09 07:46

Typescript v 2.7 released really neat flag called --esModuleInterop https://www.typescriptlang.org/docs/handbook/compiler-options.html, I am trying to figure ou

2条回答
  •  生来不讨喜
    2020-12-09 08:23

    I have also faced the same issue,

    • This issue is specific to typescript version
    • Perform below steps to remove it ( It worked for me)
    1. In your project, inside package.json file - verify that you have typescript under the dependencies devDependencies{ "typescript": "^2.5.2" }
    2. check the installed version of the typescript on your system by typing tsc -version command in terminal
    • this will show the installed version of typescript at global level
    • o/p version - 2.9.1
    1. Change version number insider package.json file with the version installed on your system.

    devDependencies{ "typescript": "^2.9.1" }

    Hope this will work!!!!!!!!!!!!

提交回复
热议问题