Babel-plugin-module-resolver: why no typescript support?

Created on 12 May 2019  路  3Comments  路  Source: tleunen/babel-plugin-module-resolver

not working example:

index.js:
require('file1')

file1.ts:
export default {x:1}

when parsing index.js with this plugin :
require("file1")


working example

index.js:
require('file1')

file1.js:
export default {x:1}

when parsing index.js with this plugin :
require("./file1")


{
  "plugins": [
    [
      "module-resolver",
      {
        "root": ["./src"]
      }
    ]
  ]
}


what is the problem with typescript files?

Most helpful comment

All 3 comments

The initial idea was that typescript is not javascript. So you would have to set your own extensions in the plugin options.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cbdeveloper picture cbdeveloper  路  4Comments

lsiden picture lsiden  路  8Comments

wlopz picture wlopz  路  7Comments

pglewis picture pglewis  路  8Comments

vjpr picture vjpr  路  8Comments