Skip to content

Commit

Permalink
refactor(register): only compile ts and tsx files from node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Masquerade-Circus committed Aug 4, 2021
1 parent 1660021 commit e1c3f01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion register.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ addHook(
}
},
loader,
minify: false,
format: "cjs",
target: "esnext",
logLevel: "warning",
Expand Down Expand Up @@ -75,6 +76,9 @@ addHook(
},
{
exts: [".js", ".jsx", ".ts", ".tsx", ".mjs", ".css", ".json", ".text", ".jpeg", ".jpg", ".png", ".gif", ".webp", ".svg", ".html"],
ignoreNodeModules: false
ignoreNodeModules: false,
matcher(fileName) {
return !/node_modules/.test(fileName) || /\.tsx?$/.test(fileName);
}
}
);

0 comments on commit e1c3f01

Please sign in to comment.