Skip to content

Commit

Permalink
refactor: disable loader warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jan 19, 2024
1 parent 4744ee1 commit e74612b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ const DEFAULT_NODE_ARGS = [
'--enable-source-maps',
]

/**
* Disable experimental warnings, since the ts-node loader hook
* uses an expiremental feature. We are waiting for them to
* cut a new release and support the newer `--import` flag
* instead
*/
if (process.allowedNodeEnvironmentFlags.has('--disable-warning')) {
// supported in node>=v21.13.0
DEFAULT_NODE_ARGS.push('--disable-warning=ExperimentalWarning')
} else {
DEFAULT_NODE_ARGS.push('--no-warnings')
}

/**
* Parses tsconfig.json and prints errors using typescript compiler
* host
Expand Down

0 comments on commit e74612b

Please sign in to comment.