diff --git a/package.json b/package.json index 62ac5ac..43506dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-transform-barrels", - "version": "1.0.10", + "version": "1.0.11", "description": "This Babel plugin transforms indirect imports through a barrel file (index.js) into direct imports.", "homepage": "https://github.com/FogelAI/babel-plugin-transform-barrels", "main": "src/barrel.js", diff --git a/src/ast.js b/src/ast.js index c744e43..ed7b7b9 100644 --- a/src/ast.js +++ b/src/ast.js @@ -6,7 +6,7 @@ class AST { static filenameToAST = (filename) => { try { const content = fs.readFileSync(filename, "utf-8"); - return parser.parse(content, { sourceType: "module", plugins:["jsx"] }); + return parser.parse(content, { sourceType: "module", plugins:["jsx", "typescript"] }); } catch (error) { return null; }