Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(register): exclude internal js files from compilation process #796

Closed
Closed
Changes from 1 commit
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
Next Next commit
fix: exclude internal js files from compilation process
fargito committed Jun 30, 2024
commit 0815951cfa42c009649ffda90141d44f2c78ea9a
5 changes: 1 addition & 4 deletions packages/register/register.ts
Original file line number Diff line number Diff line change
@@ -89,10 +89,7 @@ export function compile(
},
async = false,
) {
if (
(filename.includes('node_modules') && !AVAILABLE_TS_EXTENSION_PATTERN.test(filename)) ||
!AVAILABLE_EXTENSION_PATTERN.test(filename)
) {
if (!AVAILABLE_TS_EXTENSION_PATTERN.test(filename)) {
return sourcecode
}
if (options && typeof options.fallbackToTs === 'function' && options.fallbackToTs(filename)) {