Did you know that Typescript v 2.7 has released a cool new flag called --esModuleInterop
? Check it out at https://www.typescriptlang.org/docs/handbook/compiler-options.html. I'm currently exploring if there's a way to utilize this with tsconfig.json
, although it doesn't seem to be well-documented yet: http://www.typescriptlang.org/docs/handbook/tsconfig-json.html
Could it possibly work with the module?
setting?
My main goal is to be able to import modules like this:
import React from "react"
instead of having to write:
import * as React from "react"
And ideally, configure this in my tsconfig file.