From 4ab767855f779a8df626b996ff6018986c859d30 Mon Sep 17 00:00:00 2001 From: Ori Date: Wed, 24 Jan 2024 16:29:18 +0200 Subject: [PATCH] small typescript fix --- package.json | 2 +- src/ast.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }