Skip to content

Commit

Permalink
fix: Readd JS_EXTS to findFIles to allow for post build JS support
Browse files Browse the repository at this point in the history
  • Loading branch information
EntraptaJ committed Mar 30, 2020
1 parent 5afca98 commit 82b27c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/findFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ interface FileRule {
extensions: string[];
}

const JS_EXTS = ['.js', '.jsx'];

async function findFile(
cwd: string,
{ fileName, extensions }: FileRule,
Expand All @@ -22,7 +24,7 @@ async function findFile(
if (directoryEntry.name.includes(fileName)) {
if (directoryEntry.isDirectory()) return true;

for (let extension of extensions) {
for (let extension of [...extensions, ...JS_EXTS]) {
if (directoryFileName === fileName + extension) {
return true;
}
Expand Down

0 comments on commit 82b27c0

Please sign in to comment.