Skip to content

Commit e74612b

Browse files
committed
refactor: disable loader warnings
1 parent 4744ee1 commit e74612b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/helpers.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ const DEFAULT_NODE_ARGS = [
3333
'--enable-source-maps',
3434
]
3535

36+
/**
37+
* Disable experimental warnings, since the ts-node loader hook
38+
* uses an expiremental feature. We are waiting for them to
39+
* cut a new release and support the newer `--import` flag
40+
* instead
41+
*/
42+
if (process.allowedNodeEnvironmentFlags.has('--disable-warning')) {
43+
// supported in node>=v21.13.0
44+
DEFAULT_NODE_ARGS.push('--disable-warning=ExperimentalWarning')
45+
} else {
46+
DEFAULT_NODE_ARGS.push('--no-warnings')
47+
}
48+
3649
/**
3750
* Parses tsconfig.json and prints errors using typescript compiler
3851
* host

0 commit comments

Comments
 (0)