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

Commit

Permalink
fix: ensure only JS files are parsed (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 authored May 7, 2021
1 parent 287d616 commit 4b966f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ function scanModule(components, moduleId, state) {
}

state.visited.add(modulePath);
if (!/\.m?[jt]sx?$/.test(modulePath)) {
return components;
}

if (state.verbose) {
console.log(`[${TAG}] Reading ${modulePath}`);
}
Expand Down

0 comments on commit 4b966f6

Please sign in to comment.