Skip to content

Commit

Permalink
Merge 11a67d4 into 7ab86be
Browse files Browse the repository at this point in the history
  • Loading branch information
xel23 committed Feb 8, 2021
2 parents 7ab86be + 11a67d4 commit 4157266
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ try {
} catch (e) {}

try {
require('ts-node').register()
require('ts-node')
TYPE_SCRIPT_AVAILABLE = true
} catch (e) {}

Expand Down Expand Up @@ -374,6 +374,9 @@ function parseConfig (configFilePath, cliOptions, parseOptions) {
let configModule
if (configFilePath) {
try {
if (path.extname(configFilePath) === '.ts' && TYPE_SCRIPT_AVAILABLE) {
require('ts-node').register()
}
configModule = require(configFilePath)
if (typeof configModule === 'object' && typeof configModule.default !== 'undefined') {
configModule = configModule.default
Expand Down

0 comments on commit 4157266

Please sign in to comment.