Skip to content
This repository has been archived by the owner. It is now read-only.

Commit 4b966f6

Browse files
authored
fix: ensure only JS files are parsed (#20)
1 parent 287d616 commit 4b966f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/module.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ function scanModule(components, moduleId, state) {
111111
}
112112

113113
state.visited.add(modulePath);
114+
if (!/\.m?[jt]sx?$/.test(modulePath)) {
115+
return components;
116+
}
117+
114118
if (state.verbose) {
115119
console.log(`[${TAG}] Reading ${modulePath}`);
116120
}

0 commit comments

Comments
 (0)