Skip to content

Commit d3ee86e

Browse files
committed
fix: use node when using --import
Fixes #2157
1 parent 6fd8ce7 commit d3ee86e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/config/defaults.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ const defaults = {
2525
watchOptions: {},
2626
};
2727

28-
if ((process.env.NODE_OPTIONS || '').includes('--loader')) {
28+
const nodeOptions = process.env.NODE_OPTIONS || ''; // ?
29+
30+
if (/--(loader|import)\b/.test(nodeOptions)) {
2931
delete defaults.execMap.ts;
3032
}
3133

0 commit comments

Comments
 (0)