Skip to content

Commit 99fcacb

Browse files
committed
fix(alita): solve .jsx
fix #13
1 parent 908d2a9 commit 99fcacb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/struc/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default async function (srcpath, targetpath) {
4242

4343
const {isEntry, isRF, isFuncComp, isRNEntry} = getFileInfo(ast)
4444
if (isRNEntry) return []
45-
45+
targetpath = targetpath.indexOf('.jsx') > 0 ? targetpath.replace('.jsx', '.js') : targetpath
4646
if (isEntry && isRF) { // 入口文件 保证入口文件一定最先处理
4747
const entryResult = handleEntry(ast, targetpath)
4848
entryFilePath = entryResult.filepath

0 commit comments

Comments
 (0)