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

fix: ensure only JS files are parsed #20

Merged
merged 1 commit into from
May 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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