Skip to content

Commit

Permalink
test(config): fix test:pkg command execute error
Browse files Browse the repository at this point in the history
  • Loading branch information
eyelly-wu committed Apr 4, 2024
1 parent 813ac0a commit 06fe886
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bin/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import {
RELATIVE_PATH,
FILE_ENCODING,
} from './constants'
const tsNode = require('ts-node')

tsNode.register()
// NOTE 之前分开的写法在验证构建好的版本时会报错,这样就不会了
// 原因暂时未知
require('ts-node').register()

const configPath = join(process.cwd(), JS_CONFIG_NAME)
const tsConfigPath = join(process.cwd(), TS_CONFIG_NAME)
Expand Down

0 comments on commit 06fe886

Please sign in to comment.